Mangan signed for a second spell with the Shrews this week and his 62nd-minute header put the Sky Bet League One club into the fourth round draw.
The 29-year-old striker left Shrewsbury in the summer with the club unable to afford to keep him but made the switch back from Tranmere Rovers to link up with Mellon once again.
It sparked a big turn in fortunes for Mellon's side who lost 7-1 against Chesterfield last weekend, their worst result since 1962.
Mellon said: "More so than getting through to the fourth round, we owed a lot of people a lot of things after the performance last Saturday.
"We showed a huge amount of character to come to a club like Cardiff and get a result.
"I've signed Andy three times so you can say I'm pretty keen on him.
"He's a great talent and a great player and someone who should have played a lot more games at a higher level.
"It was tough to let him go in the summer, this club's had some tough times and this is the fourth time I have had to rebuild the team.
"It's a bit ridiculous and a frustrating at the same time but hopefully we can get settled now and move forward.
"We have to try and build on this result and hit the standards we have set."
Mangan had almost put the visitors in front inside a minute but his shot was blocked by Bruno Manga.
Sammy Ameobi hit the post for the home side in the first half but they were guilty of wasting several good chances.
Mangan's winner came just after the hour mark when he rose to meet Scott Vernon's ball from the left.
Cardiff defender Manga could have earned a replay in injury time but he put a free header wide of the post from Peter Whittingham's corner.
Bluebirds boss Russell Slade said: "I'm disappointed
There was enough ammunition out there to get the desired result.
"Sometimes you lose that little bit of continuity but, statistically it's 64 per cent possession and 27 shots, we had chances to score but we didn't take those opportunities unfortunately.
"It was an opportunity for those players to impress - the ones who haven't had so much football recently.
"They'll feel let down themselves - that's the important thing.
"Have they done themselves justice when they've been given the opportunity by the manager?
"We're all accountable
As manager, I'm accountable but players are also accountable for their own performance out on the pitch.
"Even though they've not had the benefit of playing together as a unit or as an 11 for any length of time, you're still looking for a better performance than that."
Source : PA