For months, Rachel Palma had been feeling out of sorts. She felt disoriented, experienced hallucinations, had issues holding objects, and constantly flitted between having nightmares or not sleeping at all. Eventually, she saw a specialist and was told she likely had a brain tumor, according to The Washington Post.

Back in September, Palma underwent neurosurgery at Mount Sinai Hospital in Manhattan to remove the tumor, but when doctors opened her up, they didn't find a cancerous tumor. Instead, they found a substance that turned out, on closer inspection, to be a baby tapeworm. "We looked at it under the surgical microscope, and the best way I can describe it to you is that it was this very small, encapsulated lesion that basically looked like a quail egg," Dr. Jonathan Rasouli, the chief neurosurgery resident at the Icahn School of Medicine at Mount Sinai, tells Gothamist.

The parasite thought to be a brain tumor. (Mount Sinai Health System)

Rasouli told ABC7 that the medical team was "overjoyed" when they found a tiny, slithery tapeworm there in lieu of a tumor. "When we got in there and saw that it was a tapeworm, we were like, 'YES!'" he said. "We were so happy!"

Following the surgery, they diagnosed Palma with neurocysticercosis, a parasitic infection caused by—deep breath—"swallowing microscopic eggs passed in the feces of a person who has an intestinal pork tapeworm," according to the CDC.

The parasite that doctors removed from Rachel Palma's cranium. (Mount Sinai Health System)

This might happen if, say someone eats undercooked pork that's infected with tapeworm. If it gets into their intestines, they can pass on the eggs through their feces, and if they don't wash their hands well after using the bathroom, they can potentially contaminate counters, tables, and other places where people might pick up food and eat it. The eggs can then hatch, grow into larvae, and eventually find their way into into the bloodstream, and up to the brain, causing the disease.

Neurocysticercosis isn't super common in the United States, but most cases are detected in New York, Texas, California, Illinois, and Oregon. It's preventable, but dangerous if left unchecked: It's a leading cause of adult onset epilepsy, as the CDC notes.

Palma and her doctors are stumped as to why, and when, she could have contracted it. After the surprise discovery, she was relieved, but says, "of course I was grossed out."