Detroit salvaged the final contest of a four-game series, ending a streak in which the Red Sox won eight times in 11 outings.
The Tigers overcame an early two-run deficit and the score was knotted at 3-3 heading into the fifth. Quintin Berry reached to open the inning with a bunt single off Josh Beckett (4-5), stole second and went to third when catcher Jarrod Saltalamacchia's throw sailed into center field.
Cabrera then singled to center to snap the tie.
Detroit added a run in the eighth on a home run by Delmon Young and scored twice more in the ninth, when Prince Fielder drove in a run with the 10th triple of his 8-year career and then scored on a single by Young.
Max Scherzer (5-3) went six innings to get the win, giving up three runs on seven hits while striking out six.