Goals from Adam Le Fondre, Matt Connolly and a Kenwyne Jones double earned the Bluebirds victory at Huish Park in Somerset on Sunday, but they had to come from behind after the Sky Bet League One club took the lead.
Goalkeeper Marshall went off after 20 minutes, moments before Yeovil went ahead. Then centre-half Ben Turner was taken off just after the half hour with a muscle strain.
Youngster Simon Moore, signed from Brentford a year ago, took over from Marshall and made a superb diving save to deny Kieffer Moore.
Jay Leitch-Smith put the Glovers in front after 18 minutes, tapping the ball into an empty net with Marshall hurt.
Le Fondre equalised from the penalty spot before substitute Connolly struck after 62 minutes from a Peter Whittingham corner. Jones got his first goal after 73 minutes and the big striker also hit Cardiff's fourth in the final minute.