Cardiff made a fast start as the recalled Peter Whittingham put in a devilish corner that picked out Matthew Connolly at the back post, but the defender headed his effort just wide.
Minutes later, playmaker Craig Noone waltzed his way through the defence before he forced Stephen Henderson to tip his shot over the bar as Charlton struggled to contain the Bluebirds in the early stages.
Whittingham's bright half continued as he looked sharp down the wing, and his measured cross found Kenwyne Jones but he headed his effort marginally wide.
After the break, Cardiff finally took the lead as Jones slipped the ball to Federico Macheda, who slotted it in from a few yards out.
Macheda almost doubled his tally minutes later, as his header from a Matthew Connolly cross nearly crept into the bottom corner.
Charlton struggled to create chances all afternoon, but they equalised in the 74th minute when Tony Watt fired a low shot into the net from a Roger Johnson cross.
The Addicks then won the game when Sean Morrison fouled Simon Church in the box, and Buyens buried the penalty to complete a fine comeback.