In the Mahābhārata, not Vasishtha but Varishtha, curses Gritsamada to be a wild animal as a result of Gritsamada faltering in the recitation of formulae in a sacrifice. He cursed that he would be an animal divested of intelligence, subject to grief, ever filled with fear and that he would be an animal for ten thousand years with ten and eight hundred years in addition. However, Śiva restores him to his normal form and grants him immortality.
In both the Mahābhārata and other mythologies, there are instances where characters are cursed to be animals due to their failures or mistakes in rituals. Varishtha's curse on Gritsamada is a similar concept found in this narrative.