Miranda Cosgrove is telling the people closest to her ... if it weren't for her bus driver's quick thinking this morning, she'd be dead right now.
Sources close to Miranda tell TMZ, her tour bus was en route to Kansas when it encountered an overturned semi on the road. It was pitch black outside, and by the time the bus driver saw it ... it was too late.
Rather than swerving and potentially overturning the bus, we're told the driver decided to hit the brakes and face the semi truck head on ... a decision that may have saved Miranda's life.
Sources tell us, Miranda feels very lucky to be alive -- she has a fractured right ankle that needs a cast, and a broken right baby toe. We're told she is in a lot of pain and her mom is also bruised and banged up.
We're told both Miranda and her mom will head home in a couple days to heal up. Miranda's tour is canceled until further notice.
Sadly, out of all those injured in the crash -- we're told the bus driver is in the worst condition. He had to be airlifted from the crash scene to a nearby hospital, and received 45 stitches.