Goals either side of half time saw Jupp Heynckes' men join Borussia Monchengladbach, Borussia Dortmund and Greuther Furth in the last four of the cup competition
Despite surrendering top spot in the Bundesliga to Borussia Dortmund over the weekend, Jupp Heynckes' men produced an assured performance that saw them join their title rivals in the semi-finals.
The match started in a far from auspicious manner for the visitors, however. Bastian Schweinsteiger was subject to a heavy challenge from Georg Niedermeier, and was forced to receive extensive treatment before being replaced by David Alaba.
Vedad Ibisevic missed the chance to put his side ahead after 10 minutes, but under heavy scrutiny from the Bayern ranks, his header bounced wide.
As time wore on, Bayern started to take charge. Toni Kroos let fly from distance, but the faintest of touches from Sven Ulreich ensured that the ball rattled the bar when it looked destined to sail into the net.
A minute later, the 22-year-old came close to giving his side the lead once more with another long range effort, but this time the ball cleared Ulreich's goal.
Kroos was in the thick of things, receiving the ball from Ribery before cutting back for Mario Gomez, however a Khalid Boulahrouz block prevented the Germany forward from putting his side in front.
The goal finally arrived on the half-hour mark. Rafinha and Thomas Muller exchanged passes before the German crossed for Ribery, who met the ball at the front post and sent a deft shot past Ulreich.
It was no less than the Bavarians deserved, and the Frenchman's strike ensured his side went into half-time a goal ahead.
Any chance of a Stuttgart revival took a heavy blow less than a minute into the second half. Muller crossed the ball to Gomez, and although Ulreich was able to parry the 26-year-old's first shot, he could not prevent him from smashing home the rebound to put his side into a commanding advantage.
Visibly shaken by going two goals down, Stuttgart struggled from then on in. Muller came close to ending his goal drought as he sought to latch on to a cross from the left, only for the hosts' back line to prevent him from reaching the ball.
Ribery came close to a rare headed goal late on as he rose over a stranded Boulahrouz, but a sprawling Ulreich clawed the ball away from the top corner. In the end, though, with chants of 'Auf Wiedersehen' ringing out around the Mercedes Benz Arena, the Bavarians were forced to settle for a 2-0 victory.
Jupp Heynckes side could face either Borussia Dortmund, Borussia Monchengladbach, and this season's surprise package, Greuther Furth, in the next round.