From the Super Mario Wiki
Shroob Mushrooms are light-purple Mushrooms that appear during the events of Mario & Luigi: Partners in Time. The Shroobs had the ability of firing purple energy bolts that could turn anything into a Shroob Mushroom. Toadiko, Toadbert, Kylie Koopa and Baby Bowser, are known to suffer this fate, but they are all reverted when Professor E. Gadd spreads the baby tears from the Hydrogush across the Mushroom Kingdom. Some Shroobs are also known to turn into these purple mushrooms when defeated, like Elder Princess Shroob. When Princess Shroob is disguised as Princess Peach, she holds a Shroob Mushroom to her face. Shroob Mushrooms can talk in the most extreme cases, such as when Elder Princess Shroob died at the end of Mario & Luigi: Partners in Time.