Gary Breen gave Sunderland an early lead, his shot sneaking past Neil Alexander after Andy Welsh's cross.
Marcus Stewart converted a cross from Dean Whitehead to double Sunderland's advantage just before the break.
Tony Vidmar's late header ensured a tight finish but the home team held on, while Alan Lee was dismissed in stoppage time for a professional foul.
Cardiff boss Lennie Lawrence:
"Sunderland are the best team we have played for a long time.
"I was very impressed with their front two. Marcus Stewart was easily the best player on the pitch and the other lad (Stephen Elliott), he's not bad either.
"They were very dangerous and we didn't have the same quality up front. Our goal set up a grandstand finish, but that's about all we deserved."
Sunderland: Myhre, Lynch (Lawrence 36), Caldwell, Breen, McCartney, Whitehead, Robinson, Whitley, Welsh (Danny Collins 90), Stewart, Elliott (Brown 90).
Subs Not Used: Alnwick, Bridges.
Goals: Breen 4, Stewart 42.
Cardiff: Alexander, Weston (Williams 5), Gabbidon, Vidmar, Barker, Langley, Inamoto (Ledley 69), Kavanagh, McAnuff, Jerome (Lee 58), Thorne.
Subs Not Used: Warner, Bullock.
Sent Off: Lee (90).
Goals: Vidmar 85.
Att: 32,788
Ref: T Leake (Lancashire).