After struggling to handle Peterborough's early enthusiasm Cardiff fired three goals in seven minutes just after the half hour.
It was a matchwinning few minutes that saw Peter Whittingham score direct from a corner, Rudy Gestede leap like a salmon to head the 2nd and new boy Haris Vuckic skip through to score the third.
The second half saw an avalanche of chances at the Peterborough goal. Shots whizzed just wide and just over, the keeper got fingers or feet to everything on target. City rattled the post as well.
The visitors looked to attack on the break just to relieve the pressure.
The stats show Cardiff had over 25 efforts at goal. But it was 'boro who scored the only goal of the 2nd half. Finally their policy of attacking quickly on the flanks paid off but it was a last gasp consolation.
The win was made all the sweeter with West Ham and Southampton drawing at Upton Park and Birmingham v Hull ending goalless.
Cardiff move back into 3rd place and are just three points off 2nd place.