Cardiff went into the match knowing that victory would have taken them up into the playoff places, and it was the visitors who created the first chance of the game when Tony Watt's cross picked out Anthony Pilkington, who turned down the chance to go for goal himself and saw his cutback towards Kenwyne Jones come to nothing.
Russell Slade's side were forced into an early sub due to an injury to Sean Morrison, but his replacement Bruno Ecuele Manga almost made an immediate impact, only to fluff his lines when presented with a free header.
The visitors continued to look the most likely as the first half progressed, and they came close again midway through the half when Thomas Kuszczak denied a header from Jones.
Another opening arrived just after the half-hour mark as Pilkington's deflected effort looped just over following a quick Cardiff counter, but the visitors' were made to pay for their profligacy when Birmingham took the lead right on the stroke of half time.
Paul Caddis got the goal from the spot, although controversy surrounded the award of the penalty after replays clearly showed that the ball had struck the face of Matthew Connolly, rather than his arm.
It took Cardiff some time to get into their stride after the interval, but they almost levelled things up shortly after the hour mark when Pilkington's flick from a Sammy Ameobi cross went narrowly past the post.
The Bluebirds continued to knock on the door and came close twice in quick succession with just under 20 minutes remaining, first when Ameobi sent an effort well wide when in space inside the box, and then when Jonathan Spector turned the ball against his own post following a driving run and cross from Watt.
Demarai Gray had a chance to put the game to bed with just over five minutes left as a deflected effort fell to him inside the area, but he dragged his effort wide.
The youngster had Kuszczak to thank for ensuring that it would not be a costly miss as the keeper managed to get a fingertip to a Karl Malone strike, and that proved to be the visitors' final chance as Birmingham held out for a first win in six games.