James O'Connor snatched a last-gasp equaliser as Burnley denied Cardiff.
James O'Connor rescued Burnley with a late goal
Wade Elliott's first goal in Clarets colours came in the first minute, sweeping home after a failed clearance.
Cameron Jerome equalised for Cardiff from a flick-on, then Elliott volleyed home his second only for Glenn Loovens to head the visitors level once more.
When Darrren Purse scored from the spot after Frank Sinclair hauled down Jerome it seemed Cardiff would win, but then O'Connor rose highest to head home.
Burnley manager Steve Cotterill:
"I wonder if that last five minutes was the turning point in our season? We could easily have given in then.
"It would have been easy for the players to not have the ball, to go and hide, to not make a mistake.
"We are getting done at the moment on individual errors and the sooner we can eradicate that the better."
Cardiff manager Dave Jones:
"When you score three goals away from home you should win the game, you should shut the game down. It's a bad goal to give away.
"It was the same at Wolves, we just didn't know how to close it down and be ugly, and put balls into corners.
"There was a little bit of pressure at the death that you know you're going to get."
Burnley: Coyne, Duff, McGreal, Sinclair (Lowe 90), Harley, James O'Connor, Hyde, Elliott (Bermingham 80), Branch (Spicer 72), Akinbiyi, Noel-Williams. Subs Not Used: Jensen, McCann.
Booked: Elliott, Sinclair.
Goals: Elliott 1, 23, James O'Connor 89.
Cardiff: Alexander, Whitley, Purse, Barker, Loovens, Ledley, Koumas, Weston, Cooper (Parry 83), Jerome, Ricketts (Lee 86). Subs Not Used: Ardley, Margetson, Cox.
Booked: Ricketts, Barker.
Goals: Jerome 8, Loovens 45, Purse 72 pen.
Ref: P Walton (Northamptonshire).