# CVE-2019-11932: android-gif-drawable Double Free vulnerability

> Remote attackers can execute arbitrary code or cause denial of service via a crafted GIF image in the android-gif-drawable library.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 3 Oct 2019
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-x534-j49x-mqvj

## What is CVE-2019-11932?

CVE-2019-11932 is a high-severity use after free vulnerability in koral-- android-gif-drawable, published on 3 Oct 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

A double free vulnerability in the DDGifSlurp function in decoding.c in the android-gif-drawable library before version 1.2.18, as used in WhatsApp for Android before version 2.19.244 and many other Android applications, allows remote attackers to execute arbitrary code or cause a denial of service when the library is used to parse a specially crafted GIF image.

Weakness: CWE-415 (Double Free)

## Which versions are affected by CVE-2019-11932?

2 open source packages ship an affected version, including pl.droidsonroids.gif:android-gif-drawable. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pl.droidsonroids.gif:android-gif-drawable` | Maven | All versions | 1.2.18 |
| `pl.droidsonroids.gif:android-gif-drawable` | Maven | All versions | 1.2.18 |

Products: Android-Gif-Drawable Project Android-Gif-Drawable, Whatsapp Whatsapp.

## How do I fix CVE-2019-11932?

Upgrade pl.droidsonroids.gif:android-gif-drawable to 1.2.18 or later.

## Is CVE-2019-11932 being exploited?

There is no known exploitation of CVE-2019-11932 in the wild and no public exploit code.

Public exploit code:

-  double-free bug in WhatsApp exploit poc (github_poc): https://github.com/dorkerdevil/CVE-2019-11932
- Simple POC for exploiting WhatsApp double-free bug in DDGifSlurp in decoding.c in libpl_droidsonroids_gif (github_poc): https://github.com/awakened1712/CVE-2019-11932
- This native code file aims to be complementary to the published Whatsapp GIF RCE exploit by Awakened , by calculating the system() function address and ROP gadget address for different types of devices, which then can be used to successfully exploit the vulnerability.   (github_poc): https://github.com/valbrux/CVE-2019-11932-SupportApp
- Whatsapp Automatic Payload Generator [CVE-2019-11932] (github_poc): https://github.com/Err0r-ICA/WhatsPayloadRCE
- Whatsapp remote code execution CVE-2019-11932 https://awakened1712.github.io/hacking/hacking-whatsapp-gif-rce/ (github_poc): https://github.com/kal1gh0st/WhatsAppHACK-RCE
- Programa para hackear Whatsapp Mediante Gif ,asiendo un exploit con el puerto. (github_poc): https://github.com/fastmo/CVE-2019-11932

## Other vulnerabilities in koral-- android-gif-drawable

- [CVE-2022-23435](https://insights.sbomify.com/CVE-2022-23435/): android-gif-drawable vulerable to denial of service due to unrestricted comment length (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-11932 and fix it if it is affected.

What it is: CVE-2019-11932 is a high-severity use after free vulnerability in koral-- android-gif-drawable, published on 3 Oct 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2019-11932 in the wild and no public exploit code.

Affected packages and fixed versions:
- pl.droidsonroids.gif:android-gif-drawable (Maven): affected all versions; fixed in 1.2.18
- pl.droidsonroids.gif:android-gif-drawable (Maven): affected all versions; fixed in 1.2.18

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2019-11932/ (Markdown: https://insights.sbomify.com/CVE-2019-11932/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2019-11932
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2019-11932
- OSV: https://osv.dev/vulnerability/CVE-2019-11932

---
From sbomify Insights: https://insights.sbomify.com/CVE-2019-11932/
Summaries are generated and may contain mistakes; the official description above is the record.
