World Cup - Late own goal hands Brazil win
It was a sixth win in a row for Mano Menezes's side, who host the next World Cup, but Bosnia-Herzegovina contributed much to the game and were unlucky to end on the wrong side of the scoreline.
Marcelo got Brazil off to the perfect start with a superb goal that had echoes of Carlos Alberto's legendary strike in the 1970 World Cup - albeit on the left side rather than the right.
Buoyed by the goal, Brazil passed the ball slickly, with Hernanes influential down the right and Neymar given licence to roam around strike partner Leandro Damiao.
However, just as Menezes's side were starting to enjoy themselves, Bosnia equalised against the run of play.
Ibisevic ran at Chelsea's David Luiz, who back off far enough to allow a shot. The strike did not carry much venom, but somehow bobbled past Julio Cesar in the Brazil goal - just the second goal the Selecao had conceded in eight games.
In the 20th minute, Brazil should have been back in fromt. Asmir Begovic could only parry a Damiao shot and Hernanes looked odds-on to sweep the rebound into an empty net, only for Emir Spahic to deny him with a wondrous saving tackle.
Thereafter, Bosnia-Herzegovina looked the better side, continually causing Brazil problems on the counter-attack.
The Selecao picked up markedly when Ganso replaced Ronaldinho just after the hour mark - the attacking midfielder's understanding with Santos club-mate Neymar immediately lifted the level of attacking threat.
Neymar had a great chance to restore Brazil's lead on 73 minutes when substitute Elias played him through the left channel.
The 19-year-old sprinted on to the ball, but opened his body and hit a disappointing side-foot shot that Begovic was equal to.
Another substitute, Lucas Moura, went close in the 90th minute when he showed a fantastic array of skills to spin away from three challenges, but he shot wide.
But the winner was not long in coming. A quickly-taken Ganso free-kick was worked wide to Hulk on the left, and his pacy low cross went in via the luckless Papac.