Once the spyware is installed, it allows hackers to listen in to calls made using WhatsApp's voice function
It said the attack may have been used to access the phones of a number of human rights campaigners
WhatsApp users are being urged to update their apps, after it emerged that hackers are exploiting a software flaw to wiretap people's phones.
The flaw reportedly allows attackers to install malicious code, known as "spyware", on iPhones and Android phones by ringing up the target device.
The code can be transmitted even if the user does not answer the phone and a log of the call often disappears, the Financial Times reported.
Once the spyware is installed, it allows hackers to listen in to calls made using WhatsApp's voice function.
It is not yet known who is behind the attack, but WhatsApp said it bears a resemblance to the type of spyware developed for intelligence agencies.
It said the attack may have been used to access the phones of a number of human rights campaigners, including a UK-based lawyer.
"We believe a select number of users were targeted through this vulnerability by an advanced cyber actor," WhatsApp told the FT.
"This attack has all the hallmarks of a private company known to work with governments to deliver spyware that reportedly takes over the functions of mobile phone operating systems.
"We have briefed a number of human rights organisations to share the information we can, and to work with them to notify civil society."
This is a gaping security hole, and regardless of whether or not you think you are a likely target for hackers, you should get it fixed.
Luckily, this is quite easy to do. WhatsApp has issued a software update, which is available now via Apple's App Store and Google Play.
Just open up the app store on your phone, search for WhatsApp, and hit the "update" button.
With 1.5 billion users around the world, WhatsApp is urging people to download the update as soon as possible, to avoid falling victim to the attack.
Do you have stories, videos or pictures you would like to share with the world?
Simply click on Post Your Story button placed at the top of the website