Cardiff were so much in control of this FA Cup quarter-final encounter that the Boro supporters in the capacity crowd were streaming for the exits long before the final whistle.
Man-of-the-match Peter Whittingham scored the opener and made the second with a superb free-kick as the Championship side bossed the encounter.
Boro were so predictable in their build-up that, even when they were playing with two wingers for most of the second half, they could not find a way through the solid Cardiff defence.
Indeed Boro mustered only one shot on target in the entire match and that was when record signing Afonso Alves let fly in the 27th minute to force Peter Enckelman in the City goal to make a fine save.
But Alves was replaced at half-time as Mido stepped in to lead the Boro attack.
But although the Egypt international won a lot of headers in the air there was no-one able to pick up the pieces.
The Welsh side took their chances and Boro missed theirs and that was the difference between the two sides.
Boro were undone by two clinical finishes, but Cardiff could afford the luxury of missing another three clear openings.
The Bluebirds were helped by some appalling defending from the home side.
Boro fell behind in the ninth minute when Whittingham curled a delightful right-foot shot into the top corner of the net.
Whittingham was surrounded by four Boro defenders but he still managed to get his shot away and Mark Schwarzer was rooted to the spot as the ball flew past him.
Two minutes later Jimmy Floyd Hasselbaink was gifted the opportunity to score against his former Riverside team-mates when he flung himself headlong at Tony Capaldi's cross but only managed to guide his header wide.
The lively Paul Parry almost scored a second goal but his shot flew over the bar with Schwarzer again beaten.
The killer second goal, however, wasn't long in coming. This time Whittingham turned provider with a beautifully flighted free-kick which the Boro defence failed to deal with and Roger Johnson stole in at the far post to guide his header past Schwarzer.
Fabio Rochemback was booked for a rough-house challenge as Boro's anger and frustration spilled over.
City almost grabbed a third goal when Johnson's header flew straight at Schwarzer from Kevin McNaughton's diagonal free-kick.
Despite all their possession, Boro couldn't create any clear openings and Cardiff always looked dangerous on the break.
Schwarzer managed to smother a shot from Whittingham which would have embarrassed the Teesiders even more if it had gone in, but the Bluebirds still ended deserved winners.