Chief O'Brien is having to deal with numerous malfunctions throughout the station. This includes most of the station's replicators. While fixing one of the replicators, O'Brien unwittingly activates a device that was placed in one of the replicators. Shortly afterwards, O'Brien begins showing signs of aphasia - he becomes unable to speak coherently and is unable to understand others.
At first, Doctor Bashir isn't sure why O'Brien suddenly became aphasic, tests showed no physiological causes. But when Lt. Dax suddenly becomes aphasic right before his eyes, he soon realizes that they are dealing with a virus that only mimics aphasia. He also determines that the virus is in the food that had come from command level replicators, but that the other replicators aren't producing contaminated food. But people all over the station were showing signs of infection as well. The station is put under quarantine to keep the virus from spreading.
Odo soon finds that Quark - with his replicators still not functioning - decided to produce the menu from his bar using a functional replicator in an abandoned set of crew quarters. The result was that the contanimated food was spread all over the station. As the virus spreads, Bashir discovers that the virus has mutated to become airborne. It is also causing a dangerous fever in its victims, which might kill them.
Kira soon finds a module in the last replicator O'Brien had worked on. Taking it to Bashir, the crew discovers that the module inserted computer code into the replicators that built the virus into the food. Bashir reveals that the Bajoran underground placed the module in the replicator, and that the virus was engineered by a Bajoran terrorist during the time of the Cardassian occupation of Bajor.
The doctor (Dekon Elig) who created the virus had died while in a Cardassian prison. As the doctor (Surmak Ren) who served as the creator's assistant is unwilling to help find a cure, Kira kidnaps him, causing him to become infected as well. Meanwhile virtually the entire crew is incapacitated. Captain Jameel, who was desperate to leave in order to deliver a perishable cargo, tries to leave the station without clearance, and damages his ship in the process. Quark helps Odo save the station from the ship by ejecting it from its docking port before it could explode, destroying the ship in the process. The Bajoran doctor eventually finds a cure.