The official did not say what equipment or facilities the virus targeted or when experts first detected it. However, authorities did say the computer worm may be part of an organized effort to undermine the nation's nuclear facilities.
This is the second serious virus to hit Iran in the past eight months.
In 2010, a powerful virus known as Stuxnet targeted Iran's nuclear facilities and industrial sites.
Iran has acknowledged that Stuxnet affected a limited number of centrifuges - a key component in the production of nuclear fuel - at its main uranium enrichment facility in the central city of Natanz. But Tehran has said its scientists discovered and neutralized the malware before it could cause serious damage.
The U.S. and its allies suspect Iran's nuclear program may be designing atomic weapons, but Iran has denied those charges, saying the program is only for peaceful purposes.
The Associated Press contributed to this report.