Goals on both sides of halftime saw Jupp Heynckes' men join Borussia Monchengladbach, Borussia Dortmund and Greuther Furth in the last four.
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 semifinals.
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 bouced wide.
As time wore on, Bayern started to take charge. Toni Kroos let fly from distance, but the faintest of touches from Sven Ulreich ensure 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 once more, receiving the ball from Ribery, before cutting it 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 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 halftime a goal ahead.
Any chance of a Stuttgart revival took a heavy blow less than a minute into the second half. Muller crossd 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. Thomas Muller came close to ending his goal drought as he sought to latch on to a cross from the left, only for the hosts' backline 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 Borussia Dortmund, Borussia Monchengladbach, and this season's surprise package Greuther Furth in the next round.