The 64-year-old woman from southeast NSW was admitted to a local hospital in 2021 after she experienced three weeks of diarrhoea and abdominal pain, then a constant dry cough, a fever and night sweats.
She became depressed and forgetful before a neurosurgeon at Canberra Hospital found an abnormality in her brain's right frontal lobe during an MRI scan in 2022.
When doctors performed brain surgery to investigate, they found the 8cm Ophidascaris robertsi roundworm, which scientists believed was the first to be found in a human.
The roundworms are common to carpet pythons and typically live in the animals' oesophagus and stomach before the parasites' eggs are shed in faeces.
Researchers, who identified the parasite, believed the woman became infected when she collected and cooked a type of native grass called Warrigal greens after she found it beside a lake near her home.
The greens were likely laced with the parasite shed by a python and researchers suspected the woman's other organs - including her lungs and liver - had larvae in them.
"This is the first-ever human case of Ophidascaris to be described in the world," infectious diseases expert and study co-author Sanjaya Senanayake said.
"To our knowledge, this is also the first case to involve the brain of any mammalian species, human or otherwise.
"Normally the larvae are found in small mammals and marsupials, which are eaten by the python, allowing the life cycle to complete itself in the snake."
The discovery highlighted the importance of thoroughly washing foraged foods and the dangers of diseases and infections passing from animals to humans, Dr Senanayake said.
The woman has been out of hospital for months and is living in the community, with infectious disease and brain specialists continuing to monitor her.
"This Ophidascaris infection does not transmit between people, so it won't cause a pandemic like SARS, COVID-19 or Ebola," Dr Senanayake said.
"However, the snake and parasite are found in other parts of the world, so it is likely that other cases will be recognised in coming years in other countries.
"I can't state enough our admiration for this woman who has shown patience and courage through this process."
About 30 infections have emerged globally in the past three decades and about 75 per cent of them were zootonic, meaning they could pass from animals to humans, Dr Senanayake said.
The researchers who worked on the discovery are from the Australian National University, Canberra Health Services, CSIRO, the University of Melbourne and the University of Sydney.
Their findings will be published in the journal Emerging Infectious Diseases.