It was the first time in more than half a century that Bayern had struck seven times at Bremen's Weser stadium, once a fortress when the two sides battled for Bundesliga domination up until a decade ago.
Frenchman Ribery was in top form on his return from injury to lift the Bavarians seven points clear at the top of the table on 41.
Assani Lukimya scored Werder's 50th Bundesliga own goal to put Bayern in front after 21 minutes.
Defender Daniel van Buyten rose above everyone to head in the second goal six minutes later before Ribery's chip put the game beyond doubt before the break.
After missing several chances Mario Mandzukic finally struck from close range following a Ribery assist on the hour.
Thomas Mueller drilled the ball in from 16 metres before Ribery and Mario Goetze completed a rout that will heap the pressure on Werder coach Robin Dutt.
Dutt's team, who have won just one of their last nine league games, are fifth from bottom.
Image: Franck Ribery
Photograph: Fabian Bimmer/Reuters
Bayern's Robben out for six weeks with deep laceration of knee
Robben double gives Bayern another win
Bale's 'perfect hat-trick' for Real only second treble by Briton
BEST Sports Photos of the Week!
I don't need Ballon d'Or to know I'm the best: Ibrahimovic