The Bluebirds have not emerged victorious since 1986 at Peterborough and although they twice took the lead, they were left to rue defensive lapses as Posh followed up their 2-1 win over Bristol City in sensational style.
The sides drew 4-4 the last time they met at London Road in 2009 and in an equally exciting match, Don Cowie opened the scoring before two quickfire goals from George Boyd and Grant McCann put Peterborough in front at half-time.
Peter Whittingham levelled matters with an impressive free-kick, while Aron Gunnarsson finished from close range to give Cardiff hope of ending their jinx at Peterborough.
However, McCann equalised from the penalty spot after Andrew Taylor had handled in the area, while Paul Taylor evaded the offside trap to slot home and seal victory.
In a frantic end-to-end opening that set the tempo for the entire game, Whittingham cleared off the line after Emile Sinclair was allowed a free header from McCann's inswinging corner.
It was a huge let-off for the Bluebirds following some poor defending and his intervention proved crucial as the visitors took the lead soon after.
Gunnarsson's throw was flicked back to Cowie on the edge of the area and the midfielder unleashed a superb drive that found the bottom right corner of the goal in the sixth minute.
Before this game, only leaders Southampton had scored more goals at home and stung into action, Posh turned things their way with two goals in the space of three minutes.
McCann's corner to the far post was flicked back by Ryan Bennett to give Boyd a simple finish for his second goal in as many matches in the 21st minute.
The striker was then fouled on the edge of the area and McCann's fantastic curling effort flew into the top corner to leave Malky Mackay's men reeling.
Cardiff refused to lie down though and Robert Earnshaw's 25-yard strike produced a fine save from goalkeeper Paul Jones.
However, the visitors nearly fell further behind when Lee Tomlin headed against the bar from Mark Little's cross.
Earnshaw then hit a post from Andrew Taylor's cross as Cardiff ended the half strongly.
Neither side showed any signs of slowing down after the interval and Whittingham levelled proceedings on the hour.
After Boyd had fouled Gunnarsson, Whittingham, whose penalty salvaged a 2-2 draw for Cardiff against Ipswich at the weekend, placed a delightful 20-yard free-kick into the top corner.
Cardiff continued to assert themselves and Andrew Taylor's outstanding delivery from the left was touched in from close range by Gunnarsson 11 minutes from time.
However, after laying siege to Cardiff's goal, Peterborough drew level after they were awarded a penalty when Taylor handled McCann's 25-yard strike. The veteran midfielder took the spot-kick and sent David Marshall the wrong way.
And Peterborough, for the second time in the match, stunned the Bluebirds when substitute Paul Taylor beat the offside trap to take George Boyd's long-range pass and slot past Marshall in added-on time.