Recalled striker Joe Mason bagged the only goal of the game - his fifth of the season - in the 41st minute, following up to tap home from close range after Jack Butland's parried save from Craig Conway had taken a fortuitous bounce.
It proved the only difference in what was a closely-fought encounter as Birmingham's threadbare side gave a solid account of themselves but ultimately failed to create clear-cut openings, with Marlon King, Nikola Zigic and Peter Lovenkrands all missing.
Cardiff, now with nine wins in their last 11 games, entered the year holding a five-point advantage at the summit and knowing the team leading the pile at the same stage in each of the last seven seasons have been promoted.
Mason's strike secured the Bluebirds' first win at St Andrew's since 1966 and their first league double over Birmingham in 46 years.
Despite their creditable performance it is a worrying time for Blues, who now boast just two wins in their last 11 and are four points above the drop zone entering a transfer window which could see some big names depart to ease their financial struggles.
The hosts started without an out-and-out striker on the pitch due to severe injury and suspension problems, which were worsened in the pre-match warm-up when midfielder Hayden Mullins pulled out.
But that did not stop Lee Clark's side from starting brightly as Ravel Morrison and Robert Hall - operating in a changeable front three with Nathan Redmond - combined to set up Wade Elliott, who fired just wide.
The opening quarter proved an entertaining affair, Redmond testing David Marshall from the edge of the penalty area in the 20th minute.
Blues were comfortably matching their high-flying visitors and posing the greater threat in the final third, Hall firing over the crossbar from 18 yards.
Yet further injury misery arrived for boss Clark just after the half-hour mark as Callum Reilly, a late replacement for Mullins, was forced off himself to be replaced by Morgaro Gomis.
The move disrupted the home side's rhythm and it was Cardiff who stole the lead in the 41st minute.
Conway's strike from long range was parried downwards by Butland and the ball took an unfortunate bounce off his arm before Mason rushed in to tap into an empty net.
Cardiff started the second half on the front foot, Conway seeing his goalbound effort cleared away by Curtis Davies while Craig Bellamy almost sneaked in amid hesitancy in the hosts' defence.
Blues had lost a lot of impetus ever since Reilly departed to injury but they slowly came back into proceedings as the hour mark passed.
Clear-cut chances were still at a minimum, however, with Cardiff also now posing little threat in the final third.
Substitute Rudy Gestede and then Mark Hudson headed over in the latter stages before Marshall saved well to deny Birmingham as they launched a last-gasp assault for a share of the spoils.