Mahmoud needed just two minutes to open the score line after heading home Nashat Akram's free-kick.
He doubled the lead five minutes past the hour mark with a brilliant free-kick that floated over Vietnam wall and went into the back of the net.
The war-ridden Iraq will meet the winners of Sunday's match between South Korea and Iran in the semi-finals.
Holders Japan have beaten debutants Australia 4-3 on penalties after a 1-1 draw in the quarter-finals of the competition.
Goalkeeper Yoshikatsu Kawaguchi was the hero of day for Japan, as he thwarted Australia's first two shootouts from Harry Kewell and Lucas Neill.
The tournament's top scorer Naohiro Takahara had the chance of winning the game, but he blasted his spot kick over the bar.
However, Yuji Nakazawa dispatched the fifth penalty to send the Japanese through to the semi-finals.
Australia's goal was scored by John Aloisi in the 69th minute, but Takahara equalized less than a minute later.