The Swarm (The Invisible Enemy)

The Swarm was a parasitic, virus-like entity which could assume many forms.

Biology
The Swarm worked like a disease, spreading through electrical pulses which needed to make contact with a victim's eyes. This would turn victims into agents of the Swarm, answering to a Nucleus, a microscopic and virus-like sentient organism that controlled the swarm. Visually, an infected lifeform could be recognised by the growing of grey filaments around their eyes and hands.

There was no physical matter for the virus, which existed in the mind-brain interface. The Swarm could affect non-living sentients such as robots.

History
The Swarm hangs dormant in a cloud-like anomalies in space, including the area near Saturn for untold millennia, until spaceships pass through them. In the year 5000 it was picked up by the crew of a Titan shuttle. It infected the relief crew for the Titan Base, and through them eventually most of the Bi-Al Foundation, located on Asteroid K4067.

Certain individuals (such as Leela) had antibodies that could defeat the virus. Additionally, the progress of the virus could be slowed simply by not thinking. Known victims of the Swarm included the Fourth Doctor, K9, Professor Marius, the crew of the Titan Base and most of the Bi-Al Foundation. (TV: The Invisible Enemy)

As the swarm appears to use planets on which to "breed", presumably there maybe worlds out there in which the swarm have overrun, using the former inhabitants to transport them back and spread them throughout space as part of their life cycle. However the Doctor has either never happened on one of these planets (or another space cloud) or deliberately avoids them.