So I’m not sure if this is actually the result of the Cordyceps fungus, but it sure seems like it. Cordyceps is a group parasitic fungi that attack insects, essentially dissolving and ingesting all of their non-vital organs before taking control of their brains. As their brains are consumed by the fungal hyphae, the host insect (could be a beetle, any, fly, etc) goes haywire, seeking out light. It crawls up the length of the stem towards the sun, and eventually at a certain point the insect is pretty much out of juice so it grips onto the stem. The fungus continues dissolving the rest of its host’s innards, thank you very much. It then sprouts its fruiting bodies, which from their nice high up perch rain spores down on the unsuspecting insect world below. Super brutal. I found this dead fly with the white fungus growing out of its back on a hackberry sapling. The fly is decidedly dead and has been cling to the tree for a few days now.
David Attenborough, of course, did a great segment on the fungus: