Robbie Fowler and Jimmy Floyd Hasselbaink both made their long-awaited debuts for the Bluebirds but it was not until the final minute that they managed to break down a stubborn Orient defence.
With the fourth official signalling three minutes of added time a short corner was played back to England Under-21 winger Peter Whittingham and he fired a low shot from fully 25 yards into the far corner of the net.
It was a deserved victory for the Championship side as they were on top throughout the game with Fowler and Hasselbaink showing that they will be a real asset to the Club when they reach peak match fitness.
Fowler clipped the crossbar twice in a one-sided opening period with delicate lobs that completely deceived visitors' goalkeeper Stuart Nelson.
Hasselbaink had fewer chances on goal but he did manage to fire in a couple of fierce drives and in a hectic last ten minutes forced Nelson to leap across goal to save a goal-bound header.
Orient went down to 10 men in the 68th minute when Sean Thornton received a second yellow card, both of them for handling offences but the League One leaders hung on valliantly until that last minute.
Paul Parry celebrated his return to the Wales squad by running riot down the right flank to send over a series of crosses for the Bluebirds front men but it was not until that closing minute that they finally breached the Orient defence to move into the third round.
External Reports
Western Mail
Urban 75