Tony Mowbray’s side were fortunate to still be level at half-time after Anthony Patterson saved Joe Ralls’ penalty.
Cardiff took the lead four minutes after the restart, though, as Mark Harris converted Mahlon Romeo’s low cross.
The hosts did apply some late pressure but couldn’t force an equaliser.
Our Sunderland writer Phil Smith has dished out his player ratings from the Stadium of Light:

5. Dennis Cirkin - 5
Put in one superb cross but no one was there to meet it. Steady enough but without being at his very best. 5 Photo: Frank Reid

6. Dan Neil - 4
Got away with a big early error when he was caught in possession, and did make a couple of big tackles shortly after that. Struggled in the main to cope with Cardiff’s runners. 4 Photo: Martin Swinney

7. Abdoullah Ba - 4
Deserved his start after impressing at Huddersfield. Started well in possession but wasn’t able to maintain that level - Mowbray’s midfield was in the end far too easy to play through. 4 Photo: Frank Reid

8. Patrick Roberts - 5
Involved in one or two good early counters but Sunderland’s inability to retain possession meant he saw little of it in genuinely dangerous areas. 5 Photo: Martin Swinney

