The Denevan parasites are the main antagonists of the Star Trek episode "Operation: Annihilate".
The parasites were the cause of cases of mass insanity that had destroyed civilisations for thousands of years, moving on to another planet when they had succeeded. Their next target was the Federation colony Deneva. They infected a million colonists, controlling them with their spores. Although those infected had free will, the parasites forced them to obey their will by causing them extreme pain, which led to madness and death. One colonist was witnessed by the Enterprise freeing himself of the infection by flying into the sun.
Among those who died as a result of the infection were Captain Kirk's brother and sister-in-law, Sam and Aurelan. His nephew Peter was taken aboard the Enterprise and sedated. During an exploration of the planet's surface, an Enterprise landing party discovered the parasites and learned that, because each was a single cell of a larger organism, they were highly resistant to phaser fire. One attached itself to Lieutenant Commander Spock and infected him but he was able to resist the pain it caused and capture one of the creatures for analysis.
On board the Enterprise, inspired by the fact that the sun offered a solution, Kirk, Spock and McCoy managed to destroy first the test creature and then the one infecting Spock by exposing it to high intensity light. The results concluded that the particular light they were vulnerable to was not visible to humans. The Enterprise deployed satellites which bathed the planet in ultraviolet light, destroying the parasites and freeing the colonists.