The Ivory Coast international has been without a club since departing Championship rivals Leeds United in September due to "personal reasons".
Speaking to his new side's official website, Bamba said: "I'm excited to be here. I always want to work with the gaffer, so as soon as this chance arose I jumped at it. I know the league very well and am looking forward to offering my experience and leadership to Cardiff City."
Boss Warnock, who has only been in charge of the Welsh outfit for a week, added: "I tried to sign Sol a few years ago when he was at Leicester, on a couple of occasions.
"They didn't come off then, but now is the right time and opportunity to bring him in. Sol's a leader and he's another good addition for us."
Cardiff parted company with Paul Trollope during the international break following a poor start to the campaign, which has left Cardiff inside the bottom three ahead of Friday's visit of rivals Bristol City. body check tags ::