"A virus, a virus. He thinks I am a virus. A virus, a virus. Well, perhaps, I'll be a virus today."
A computer virus is a self-replicating program, usually designed with the intention of causing damage to or otherwise altering computer systems. The nomenclature originates from a pathological virus in the sense that a virus reproduces and causes harm to its host.
In 2154, the warp matrix of the Enterprise was compromised by a subroutine planted by a group of Klingon Augments. The subroutine also compromised the starship's command protocols. (ENT: "Affliction", "Divergence")
Prior to his open defection to the Maquis in 2372, Michael Eddington planted cascade viruses in Deep Space 9 and the USS Defiant's computers. This allowed him to disable the Defiant at a critical time. Fortunately, Odo was able to find and delete the one in the station's computers before it could be activated. (DS9: "For the Uniform")
Also during that year, Harry Kim suggested that The Clown might be a computer virus of some sort, unaware that he was actually a malevolent mainfestation of the fears of the Kohl that had been trapped in the neural network. The Clown mocked him for this suggestion and commented that he had a "mind full of technical and operational thoughts and ideas." (VOY: "The Thaw")
Ramuran tracers use computer viruses to eliminate any records of their presence from alien ships. Both of USS Voyager's encounters with the Ramurans in 2374 were erased in this manner. (VOY: "Unforgettable")