Bug gives attackers a way to use GIF images to steal data from Android devices running the message app.

4 Min Read

A security researcher this week posted details on a new remotely exploitable vulnerability in WhatsApp that attackers could leverage via a malicious GIF image to steal messages, video, audio, and other content from devices running the app.

The disclosure on GitHub, by a researcher using the handle "Awakened," is the second critical vulnerability involving WhatsApp in recent months, suggesting that secure messaging apps are not as secure as many users might perceive. In May, Facebook, which owns WhatsApp, warned about an attacker — thought to be a private company working on behalf of a government — exploiting a security flaw on WhatsApp to spy on human right organizations.

In the latest case, the bug impacts WhatsApp for Android versions 2.19.230 and before on devices running Android 8.1 and 9.0 devices. Facebook has acknowledged the issue and patched it in the latest WhatsApp version 2.19.244.

The bug does not exist in WhatsApp itself but rather in an open source library that the application uses to parse media files. The so-called double-free vulnerability (tracked as CVE-2019-11932) stems from how memory is allocated when GIF images are parsed in WhatsApp. A double-free vulnerability involves an app calling the same memory space on a device twice, resulting in a memory leak.

"The user's phone may get remotely controlled by the attacker, allowing them to run codes and commands with all WhatsApp permissions," says Pham Hong Nhat, the Vietnamese security researcher who uses the handle Awakened. The vulnerability gives attackers a way to read the contents of the SD card, read the message database, record video and take other actions, he says. The GIF file just needs to be planted on the user's SD card. It can be sent through chat messengers, downloads or emails, he says. Pham says he notified Facebook about the issue in late July to early August.

Ashlee Benge, threat researcher at ZeroFox, says one likely exploitation scenario involves an attacker sending a potential victim a malicious GIF file.

If the attacker's phone number is in the recipient's contacts — which could happen via social engineering, for instance — the GIF file could be downloaded to the recipient's device without any kind of user interaction, Benge says. "Then, when the recipient goes to open the WhatsApp Images folder, like if they were sending an image in a message, the exploit will be triggered," she explains.

If the sender was not a contact, the recipient would have to be tricked into saving the image prior to the exploit being triggered, Benge says.

Not Easy to Exploit
The new vulnerability in WhatsApp is not especially easy to exploit, adds Jonathan Knudsen, senior security strategist at Synopsys. "It's not like the old Ping of Death or the more recent bug where a malformed message would cause an iPhone to fail," he says. The WhatsApp  vulnerability requires the attacker already have another toehold on the target's device. Only then could the attacker be able to deliver a crafted GIF that would take control. An attacker that exploited the flaw would be able to do anything on the device that WhatsApp has permission to access, he says. 

"Successful exploitation of this could trigger the application crashing or, in worst-case scenarios, grant the attacker the ability to execute arbitrary code on a victim's device," Benge says. It could allow attackers to access the WhatsApp message database and other sensitive files on the user device.

The most troubling part about the vulnerability is that it exists in a software component that other application developers are likely using as well. So the threat is not confined just to WhatsApp but to any app using the vulnerable open source media library. There's no telling how many apps use the same library and are similarly vulnerable, Knudsen says.

In a brief statement, a Facebook spokeswoman said the issue was reported to the company and quickly addressed last month. "We have no reason to believe this affected any users, though, of course, we are always working to provide the latest security features to our users.”

Awakened, the security researcher who disclosed the bug, is urging WhatsApp uses to update to the latest version of the messaging apps to stay safe from potential attacks.

"From a user perspective, the most important takeaway is being vigilant about updates," Knudsen says. "Vulnerabilities happen all the time, so the best a user can do is keep software current so that known vulnerabilities are addressed."

Related Content:

Check out The Edge, Dark Reading's new section for features, threat data, and in-depth perspectives. Today's top story: "How the City of Angels Is Tackling Cyber Devilry"

 

About the Author(s)

Jai Vijayan, Contributing Writer

Jai Vijayan is a seasoned technology reporter with over 20 years of experience in IT trade journalism. He was most recently a Senior Editor at Computerworld, where he covered information security and data privacy issues for the publication. Over the course of his 20-year career at Computerworld, Jai also covered a variety of other technology topics, including big data, Hadoop, Internet of Things, e-voting, and data analytics. Prior to Computerworld, Jai covered technology issues for The Economic Times in Bangalore, India. Jai has a Master's degree in Statistics and lives in Naperville, Ill.

Keep up with the latest cybersecurity threats, newly discovered vulnerabilities, data breach information, and emerging trends. Delivered daily or weekly right to your email inbox.

You May Also Like


More Insights