Mangan, making his return to the club after rejoining them from Tranmere last week, headed the only goal of the game in the 62nd minute to clinch Town's place in the fourth round and shock their Championship hosts.
The Scouse striker loves the big occasion and continued his record from last season that saw him score against Chelsea and Leicester in the Capital One Cup.
Mangan deserved his strike for adding some much needed pace and movement to the attack, and his energy meant Cardiff's defence couldn't rest for a moment.
And it was the perfect way to bounce back from last week's 7-1 humiliation at Chesterfield, their biggest defeat in nearly 52 years.
It was a game that screamed 'back to the future' as Mangan and Jack Grimmer made their second 'debuts' for Town, while boss Micky Mellon reverted to his 3-5-2 formation that worked so well in the promotion campaign.
And despite Cardiff bossing the first half when they forced virtually all the play and hit the post through Sammy Ameobi, the Bluebirds couldn't capitalise on their territorial advantage.
There were five changes for Town - Nat Knight-Percival, Grimmer, Mat Sadler, Jordan Clark and Mangan for Abu Ogogo, Jermaine Grandison, Junior Brown, Shaun Whalley and James Collins.
Brown was suspended after his sending off last week, Ogogo was injured and Grandison and Whalley dropped to the bench, while Collins has joined Northampton on loan for the rest of the season.
There was also a change in formation as Town reverted to a more cautious 3-5-2 from 4-4-2, while Knight-Percival replaced Collins as captain.
Once the action started on a boggy pitch, Town had the first sight of goal after just 27 seconds when Mangan turned Bruno Manga only for the defender to get a vital toe to his shot which deflected it over.
But apart from an Ian Black free kick that sailed a foot too high, the rest of the half belonged to Cardiff in terms of chances.
Mat Sadler took the sting out of Alex Revell's shot which flew wide, then Sammy Ameobi turned and fired wide.
Then came Black's effort, but the Bluebirds were soon back on the offensive as Federico Macheda's deflected drive forced Mark Halstead to scramble away then palm away Revell's follow-up in the 23rd minute.
Three minutes later, Ameobi curled a low effort against the base of the post as Cardiff looked for the breakthrough.
Ameobi turned provider on 37 when he put through Revell but, with time on his side, the striker rushed his shot and toe-poked straight at Halstead when he could have taken the ball on.
Town gained in confidence as the half wore on, reinforced by the refreshing pace and movement of newcomers Grimmer and Mangan, who added a different dimension to their previously ponderous play.
Cardiff started the second half on the attack and Halstead made a falling save from Gabriel Tamas's long-range effort.
For all their chances, Cardiff lacked some incisiveness about their play and Town's back three - in which Zak Whitbread and Knight-Percival were superb - weren't having much trouble containing them.
And when Town broke, they had the pace and mobility in Mangan to threaten the home defence.
The former Fleetwood man proved he was the man for the big occasion just after the hour when he sent the 600 Town fans into ecstasy.
There seemed little threat when Larnell Cole fed Vernon, who had drifted out to the left wing.
But the big striker produced a peach of a cross for Mangan, who pulled away from two defenders at the far post to net with a stooping header.
Cardiff's attempts at a comeback were stifled by poor final balls on too many occasions, and to underline the fact there were boos when Ameobi ballooned a cross behind.
It was left to Town to threaten on the break and they crafted a superb chance when Mangan outpaced his man on the left 11 minutes from time.
The busy frontman crossed for Clark, who stabbed just wide.
There was still time for sub Jermaine Grandison to hit the post as Town ran down the clock.
But it was that man Mangan who stole the limelight and caused one of the upsets of the third round.

5. 159c22d0-81fc-4439-85b9-56baef1542d4.jpg

6. 337d7036-34b6-4002-8e05-f825d9edb80b.jpg

7. 4d7d0e8c-ed82-4357-b09a-fd0ba477a60e.jpg


