The petrified victims were cured by basilisk venom itself—administered via Fawkes's tears.
Paradoxically, the venom that petrifies also contains the antidote. Dumbledore's phoenix Fawkes cried tears infused with the venom, which reversed the petrification when applied.