Dunn scored ahead of a homer by Arizona third baseman Mark Reynolds after Villone's walk in the sixth, and Flores' walk kept the seventh inning alive long enough for an insurance run to score on a wild pitch.
Meanwhile, righty reliever Kyle McClellan appears to have hit the wall in his first big league season. McClellan surrendered Reynolds' sixth-inning homer to tie the score and then was charged with two more runs in the seventh as he fell to 2-7 for the season.
"You can't lose a game like that," manager Tony La Russa said after watching his team give up runs in six straight innings.
The Cardinals hit four homers, but so did Arizona.
"Every time we got a ball where we shouldn't have, they hit the ball out of the park," said La Russa, who seemed unhappiest with Pineiro, who has blown a number of leads this season.
First baseman Albert Pujols remains the hottest hitter in the league, jumping his average to a league-leading .363 with a recent surge. But he grounded into an inning-ending double play with the tying runs on base in the eighth.
When Arizona lefty Randy Johnson was reeling, the Cardinals also missed a chance in the fourth when right fielder Ryan Ludwick fanned with runners at second and third and one out and, after an intentional walk to Pujols, third baseman Troy Glaus popped up.
The Cardinals led 5-2 at that point, and La Russa said, "That would have been a good add-on."
DIAMONDBACKS 8, CARDINALS 6: With the other wild-card contenders losing, the Cardinals blew a four-run lead en route to their fourth straight loss on what already is assured of being a losing six-game trip.
RHP Joel Pineiro -- who had won three straight decisions before being moved to the bullpen two weeks ago when RHP Adam Wainwright came off the disabled list -- was rusty in giving up four runs in five innings.
NOTES AND QUOTES:
--LHP Randy Flores was recalled from Class AAA Memphis and RHP Chris Carpenter was activated from the disabled list Monday. On Tuesday, joining the Cardinals in Arizona from Memphis will be INFs Brendan Ryan and Brian Barden, C Mark Johnson and RHPs Kelvin Jimenez and Jason Motte. RHP Josh Kinney, who has been on a rehabilitation option at Class AA Springfield, will be removed from the disabled list.
--RHP Chris Carpenter was activated from the disabled list Monday. Carpenter, recovering from a strained right shoulder, will be used strictly as a reliever in the last month.
--RF Ryan Ludwick was 0-for-12 with six strikeouts before doubling twice in Monday's game.
--CF Joe Mather, who homered in the second, left the game after four innings with a sprained left wrist. Mather injured it trying to check his swing as he struck out in the third and then he landed on the wrist trying to make a diving catch in the bottom of the inning. But the checked swing seemed the bigger issue and Mather will see a hand specialist Tuesday.
--SS Cesar Izturis, advised to be more aggressive before the game by hitting coach Hal McRae, got three singles in his final three at-bats. He also stole two bases.
BY THE NUMBERS: 96 -- Number of games pitched over two seasons by RHP Russ Springer before he suffered a loss on Aug. 29 at Houston.