Bailey, a junior, picked off a pass by Cardinal quarterback Kevin Hogan with 10 minutes 39 seconds left in the fourth quarter on a third-and-goal from the 10.
Cravens, a freshman, intercepted a tipped pass with 3:02 left to give the Trojans the possession that ended in the game-winning field goal.
Bailey and Cravens each have four interceptions this season.
Bailey has 10 career interceptions.
Linebacker Anthony Sarao had a team-best 12 tackles, linebacker Hayes Pullard 11.
Leonard Williams plays
USC defensive end Leonard Williams played despite a shoulder injury that could require surgery after the season.
The 6-foot-5, 290-pound sophomore from Florida made four tackles in the first half and finished with seven.
Soma Vainuku catching on
Fullback Soma Vainuku has been a special teams standout for USC, blocking two punts, including one that was returned for a touchdown last week against California.
Vainuku stepped up in the first quarter, catching a one-yard touchdown pass from quarterback Cody Kessler to give USC a 6-0 lead.
Vainuku also had a 15-yard reception that started the Trojans' second scoring drive.
Tre Madden returns
USC tailback Tre Madden, who played sparingly at Oregon State and sat out against Cal because of a hamstring injury, entered the game in the second quarter.
The third-year sophomore gained 11 yards in six carries.
Madden, however, remains the Trojans' leading rusher with 682 yards.
Jordan Williamson sat out because of an apparent leg injury, so former Loyola High kicker Conrad Ukropina handled kicking for Stanford.