WhatsApp has urged users to upgrade the app and told the Data Protection Commission of a "serious security vulnerability".

WhatsApp rushed to roll out a security fix after concerns were raised hackers could inject surveillance software on to phones via the call function.

The app, which is used by 1.5 billion people around the world, discovered a vulnerability that allowed attackers to install malicious code on iPhones and Android phones by ringing up a target device.

The code could be transmitted even if users did not answer their phones and a log of the call often disappeared, the Financial Times reported.

WhatsApp attack: How to protect your smart device

WhatsApp, which is owned by Facebook and has its European headquarters in Dublin, said the attack bore a resemblance to spyware developed for intelligence agencies.

In a statement, the regulator said: "The Data Protection Commission has been informed by WhatsApp Ireland of a serious security vulnerability," adding that this may have allowed a "malicious actor" to access personal information.

"The DPC is actively engaging with WhatsApp Ireland to determine if and to what extent any WhatsApp EU user data has been affected," it said.

It echoed WhatsApp in encouraging users to update the app, as "the possibility remains that EU users were affected".

There are concerns that the software was used in attempts to access the phones 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 Financial Times.

"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."

The firm is said to have alerted officials at the US Department of Justice after discovering the vulnerability in early May.

WhatsApp said it released a software update yesterday.

According to the FT, the spyware was developed by NSO Group, an Israeli cybersecurity and intelligence company.

The company told the paper: "Under no circumstances would NSO be involved in the operating or identifying of targets of its technology, which is solely operated by intelligence and law enforcement agencies.

"NSO would not, or could not, use its technology in its own right to target any person or organisation, including this individual (the UK lawyer)."

The vulnerability and suspected attacks have been investigated by Citizen Lab, a research group at the University of Toronto.

"We believe an attacker tried (and was blocked by WhatsApp) to exploit it as recently as yesterday to target a human rights lawyer," the lab said.

Yesterday, Amnesty International said it was backing legal action against the Israeli Ministry of Defence demanding that it revokes NSO Group's export licence.

Danna Ingleton, deputy director of Amnesty Tech, said: "NSO Group sells its products to governments who are known for outrageous human rights abuses, giving them the tools to track activists and critics."

Additional Reporting AFP