The Pirates, just two setbacks away from a 100-loss season, came from behind twice to end a four-game losing streak.
Esmerling Vasquez (1-6) came to the mound with one out and nobody on in the ninth and promptly walked pinch-hitter McCutchen on a 3-2 pitch. Ryan Doumit drew a four-pitch walk before Cedeno came through with a single to right that ended the game.
Doumit and Neil Walker both had a solo homer for the Pirates.
Evan Meek (5-4) earned the victory in relief. He recorded the last two outs in the top of the ninth.
Arizona has lost six times in its last eight games.