Vice President Ali Akbar Salehi says details about the virus became known only after Iran's "enemies failed to achieve their goals."
Salehi's remarks on Tuesday came a day after diplomats told The Associated Press in Vienna that Iran's nuclear program has suffered a recent setback, with major technical problems forcing the temporary shutdown of thousands of centrifuges enriching uranium.
Iran has earlier confirmed that Stuxnet infected several personal laptops belonging to employees at the Bushehr nuclear power plant but that plant systems were not affected.
Salehi that a months-long delay in starting up Iran's first nuclear power plant was the result of a small leak, not the computer worm.
The leak occurred in a storage pool where the plant's fuel was being held before being fed into the reactor core, and it was fixed, said Salehi. He did not specify whether it was nuclear fuel or another material that leaked.
Iranian officials had said they were vigorously battling the Stuxnet worm, which they suspect was part of a covert plot by the West to damage Iran's nuclear work. The United States, Israel and others accuse Iran of seeking to use the Bushehr power plant and other civil nuclear sites as a cover for a secret program to develop atomic weapons.
Iran denies any nuclear weapons ambitions and says its program is only for peaceful purposes like power generation and medical research.
The malicious computer code, designed to take over industrial sites like power plants, has also emerged in India, Indonesia and the U.S. But it has spread the most in Iran.
U.S. on Alert Over Stuxnet Virus Threat
Though it infected several personal computers of workers at the Bushehr plant, Iran says the facility's main systems were not affected. Still, that was the first public sign to emerge that the code has hit computers linked to Iran's nuclear program.