Cordyceps militaris, commonly known as the caterpillar fungus, is a species of fungus in the family Cordycipitaceae, and the type species of the genus Cordyceps, which consists of hundreds of species.