Cybersecurity experts have warned WhatsApp users to update the messaging app as soon as possible following the discovery of a major vulnerability.

The issues mean it could allow attackers to install a malicious code on smartphones.

The Facebook-owned app said it identified and fixed the issue earlier this month but Citizen Lab, a research group at the University of Toronto, suspects that an attacker attempted to exploit it again on Sunday.

WhatsApp believes that a select number of users were targeted by an advanced cyber actor, exploiting its voice calling feature, which it said had all the hallmarks of a private company reportedly that works with governments to deliver spyware that takes over the functions of mobile phone operating systems.

"It demonstrates the importance of keeping your software updated," said Dr Budi Arief, a cybersecurity expert at the University of Kent.

"I'm not particularly surprised by this development, this happens all the time.

"This recent vulnerability bears a resemblance to the Apple FaceTime vulnerability discovered earlier this year.

"At this stage, it is too early to say whether there is any connection between the WhatsApp vulnerability and the FaceTime vulnerability.

"Software is a very complex system - it's practically impossible to guarantee it is completely bug-free, there are always potential vulnerabilities that could be exploited."

WhatsApp said it was deeply concerned about the abuse of such capabilities and is also urging users to update their apps out of an abundance of caution.

"WhatsApp encourages people to upgrade to the latest version of our app, as well as keep their mobile operating system up to date, to protect against potential targeted exploits designed to compromise information stored on mobile devices," a spokeswoman said.

"We are constantly working alongside industry partners to provide the latest security enhancements to help protect our users."

The National Cyber Security Centre (NCSC) has reiterated the importance of keeping devices up to date and published guidance in response to the incident.

"WhatsApp have today announced a vulnerability that could have allowed users' phones to be compromised," an NCSC spokesman said.

"The company has reportedly said that a small number of accounts have been affected and has told its users to update their apps using standard updates from the app store as a precaution.

"The NCSC has published guidance for users and always recommends that people protect their device by installing updates as soon as they become available.

"The NCSC also recommends that people switch on automatic updates to install them as quickly as possible."