Bayern close in on Bundesliga top spot
Wolfsburg joined Bayern on 48 points with their seventh win in a row, a convincing 3-0 victory against hosts Arminia Bielefeld.
Striker Grafite took his season's goal tally to 18 when he netted Wolfsburg's second.
Newcomers Hoffenheim failed to win for a seventh straight match, needing a late goal from Wellington to draw 2-2 against lowly Hanover. Hoffenheim are fifth on 44 points.
Bayern were the livelier side from the start against Karlsruhe with an eager Ribery wreaking havoc on the left side.
Bastian Schweinsteiger and Mark van Bommel came close to converting his crosses early on but it was Jose Sosa who scored with a close-range effort after a Ribery solo run and smooth pass into the Argentine's path.
Bayern, rarely threatened in defence, came close again through Martin Demichelis in the 65th minute but Karlsruhe keeper Markus Miller pushed his header on to the crossbar.
But their complacency was almost punished when the visitors, bottom of the league, came close to an equaliser a minute later with Antonio da Silva's 30-metre free kick pushed to the post by Bayern keeper Michael Rensing.
"The most important thing is we got the three points," Bayern coach Juergen Klinsmann said, adding they should have sealed the win in the first half.
"We were too hectic in the second half and not calm enough."
Hertha found no solution to Stuttgart's attacking play.
As usual, Lucien Favre's team conceded the midfield early on to Stuttgart, lurking for their trademark quick counter attacks.
Stuttgart were the more dangerous side with Timo Gebhart and Mario Gomez coming close twice.
While they probably deserved a goal in the first half, they got it only two minutes after the restart when Mario Gomez headed on a deep cross from keeper Jens Lehmann into the path of Cacau who fired home from 10 metres.
Five minutes later, they were up 2-0 when midfielder Sami Khedira headed home a free kick cross from Thomas Hitzlsperger.
Hertha pushed forward and had a few good chances through Andriy Voronin and Pal Dardai but their nervous attacks came too late, as Stuttgart move to 42 points and back in contention for a UEFA Cup spot.
"We can play badly once and as a coach you have to accept it," Favre said. "Stuttgart were far better."
Hamburg SV, in fourth on 45, play Schalke 04 on Sunday.