Mark Harris’ first goal in seven matches earned Cardiff a 1-0 win at Sunderland in the Sky Bet Championship.
The Welshman, in with a shout of going to the World Cup, pounced in the area to convert from close range in the 49th minute despite claims for offside from the hosts.
That decisive goal arrived after a frantic first half in which Cardiff’s Joe Ralls missed a penalty.
However, the Bluebirds still managed to improve on a disappointing record that had seen Mark Hudson’s side lose four of their previous five games.
Sunderland struggled to get going and although they did improve slightly after Harris’ opener they did little to even look like winning back-to-back matches for the first time this season.
It was amazing that the game was still goalless at half-time.
Before five minutes had even gone on the clock there had been a fantastic chance for both teams.
Sunderland winger Jack Clarke had an effort drop just wide after he was allowed to cut inside from the left.
And with the very next attack Cardiff should have scored when Sheyi Ojo wanted an extra touch in an unmarked position when he was picked out by Harris, enabling Sunderland to clear.
An even greater chance arrived for the visitors when Danny Batth brought down Ojo when the forward looked set to score following an awful, misplaced Bailey Wright pass into the area.
After a booking for Batth, Cardiff’s captain Ralls missed the penalty with goalkeeper Anthony Patterson diving to his left to turn away a spot-kick that was well struck.
There was still plenty time for further opportunities before the break.
Sunderland’s Amad Diallo had an effort cleared off the line by Perry Ng before Cardiff striker Harris chipped over Patterson and wide when he was played in by Niels Nkounkou.
Sunderland just could not get going and Cardiff made the decisive breakthrough four minutes into the second half, even if there were claims for offside from the home team.
Mahlon Romeo’s scuffed shot after running deep into the Sunderland half was turned in by Harris from close range when he had got in behind the defence.
Sunderland did find an extra gear following the introductions of Corry Evans and Alex Pritchard just before the hour.
And it was Pritchard’s free-kick that curled into the side-netting soon after as Tony Mowbray’s men tried to find a way back into the contest.
Striker Ellis Simms, on loan from Everton and back from injury, flicked a header over the bar with 29 minutes remaining as Sunderland’s fans sensed there may be an equaliser.
But despite the Black Cats’ tame attempts to claw level, Cardiff goalkeeper Ryan Allsop was never seriously tested, although he did have to hold an effort from substitute Elliot Embleton with five minutes remaining.