Sabri Lamouchi's first game as Cardiff boss ended in defeat as Elijah Adebayo scored a late winner to move Luton into the Championship play-off places.
Adebayo made amends after Ryan Allsop looked to have earned Cardiff a point by saving Adebayo's tame penalty after Cedric Kipre's handball.
Cardiff are winless in 12 games and only three points above the relegation zone having not won since 5 November.
They came closest to a goal when Callum Robinson struck the crossbar early on.
Cardiff's relegation worries only deepened with defeat at Kenilworth Road as they remain 21st, while Luton rise to fourth.
This was a high stakes contest for both sides with former France international Lamouchi the third new face in the Cardiff dug-out this season, following Steve Morison and Mark Hudson who have both been sacked in what has been a hugely disappointing season for the Bluebirds.
However, Cardiff have enjoyed a fine recent record at Kenilworth Road, winning their last three visits and unbeaten in five, though the Hatters were victorious when the sides met in August in south Wales.
Lamouchi made four changes as he selected his first Cardiff XI, while Leeds' Cody Drameh made his Hatters debut against Cardiff, whom he played for on loan last season.
Cardiff, hampered by a transfer embargo for much of the January transfer window were still trying to sign players as this contest kicked-off, ill-timed from their perspective as they looked to bolster the lowest scoring side in the Championship with a loan acquisition or two.
The Bluebirds have now scored just 21 goals in 29 league games and the two sides directly below them have played two games fewer than Cardiff.
The shot-shy Bluebirds came closest to an early opening goal, but Callum Robinson's swerving 25-yard effort crashed back off the crossbar.
Luton looked the more threatening side despite two efforts from Cardiff's Sheyi Ojo, but they failed to test Cardiff with Adebayo's header their only effort on target in a first half that lacked spark.
The hosts came close after the break with Cauley Woodrow firing over after Drameh's astute cross, but Cardiff also threatened as Luton goalkeeper Ethan Horvath was forced into a sprawling save to deny Ojo.
A game of few chances looked set to swing in Luton's favour after Kipre's handball, but Allsop's super save preserved parity.
However, the Hatters found a winner on 88 minutes as Alfie Doughty's deflected cross found Adebayo who found the net with a close-range header to lift Luton into the play-off places.
Luton Town: Horvath, Burke, Lockyer, Bell, Drameh (Onyedinma 69'), Clark, Mpanzu, Doughty, Woodrow (Berry 69'), Morris, Adebayo. Subs Not Used: Walton, Watson, Campbell, Thorpe, Osho.
Cardiff City: Allsop, Ng, Kipré, McGuinness, Simpson, Ralls (Philogene 77'), Wintle, Sawyers, Ojo, Harris (R. Colwill 77'), Robinson. Subs Not Used: Alnwick, X. Benjamin, Rinomhota, Davies, Etete.