# CVE-2016-4994: Use after free in n/a

> Remote attackers can cause a crash or execute arbitrary code in GIMP by tricking users into opening a crafted XCF file.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/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:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 12 Jul 2016
- **Updated:** 6 Aug 2024
- **Also known as:** DEBIAN-CVE-2016-4994, DLA-525-1, DSA-3612-1, GHSA-94h5-f27v-4pc3, MGASA-2016-0241, RHSA-2016:2589, SUSE-SU-2016:1827-1, SUSE-SU-2016:1962-1, UBUNTU-CVE-2016-4994, USN-3025-1

## What is CVE-2016-4994?

CVE-2016-4994 is a high-severity use after free vulnerability in Gimp Gimp, published on 12 Jul 2016. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

Use-after-free vulnerability in the xcf_load_image function in app/xcf/xcf-load.c in GIMP allows remote attackers to cause a denial of service (program crash) or possibly execute arbitrary code via a crafted XCF file.

Weakness: CWE-416 (Use After Free)

## Which versions are affected by CVE-2016-4994?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `gimp` | Red Hat:enterprise_linux:7::client | All versions | 2:2.8.16-3.el7 |
| `gimp-debuginfo` | Red Hat:enterprise_linux:7::client | All versions | 2:2.8.16-3.el7 |
| `gimp-devel` | Red Hat:enterprise_linux:7::client | All versions | 2:2.8.16-3.el7 |
| `gimp-devel-tools` | Red Hat:enterprise_linux:7::client | All versions | 2:2.8.16-3.el7 |
| `gimp-help` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-ca` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-da` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-de` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-el` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-en_GB` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-es` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-fr` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-it` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-ja` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-ko` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-nl` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-nn` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-pt_BR` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-ru` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-sl` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-sv` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-help-zh_CN` | Red Hat:enterprise_linux:7::client | All versions | 0:2.8.2-1.el7 |
| `gimp-libs` | Red Hat:enterprise_linux:7::client | All versions | 2:2.8.16-3.el7 |
| `gimp` | Red Hat:enterprise_linux:7::server | All versions | 2:2.8.16-3.el7 |
| `gimp-debuginfo` | Red Hat:enterprise_linux:7::server | All versions | 2:2.8.16-3.el7 |
| `gimp-devel` | Red Hat:enterprise_linux:7::server | All versions | 2:2.8.16-3.el7 |
| `gimp-devel-tools` | Red Hat:enterprise_linux:7::server | All versions | 2:2.8.16-3.el7 |
| `gimp-help` | Red Hat:enterprise_linux:7::server | All versions | 0:2.8.2-1.el7 |
| `gimp-help-ca` | Red Hat:enterprise_linux:7::server | All versions | 0:2.8.2-1.el7 |
| `gimp-help-da` | Red Hat:enterprise_linux:7::server | All versions | 0:2.8.2-1.el7 |
| `gimp-help-de` | Red Hat:enterprise_linux:7::server | All versions | 0:2.8.2-1.el7 |
| `gimp-help-el` | Red Hat:enterprise_linux:7::server | All versions | 0:2.8.2-1.el7 |
| `gimp-help-en_GB` | Red Hat:enterprise_linux:7::server | All versions | 0:2.8.2-1.el7 |
| `gimp-help-es` | Red Hat:enterprise_linux:7::server | All versions | 0:2.8.2-1.el7 |
| `gimp-help-fr` | Red Hat:enterprise_linux:7::server | All versions | 0:2.8.2-1.el7 |
| `gimp-help-it` | Red Hat:enterprise_linux:7::server | All versions | 0:2.8.2-1.el7 |
| `gimp-help-ja` | Red Hat:enterprise_linux:7::server | All versions | 0:2.8.2-1.el7 |
| `gimp-help-ko` | Red Hat:enterprise_linux:7::server | All versions | 0:2.8.2-1.el7 |
| `gimp-help-nl` | Red Hat:enterprise_linux:7::server | All versions | 0:2.8.2-1.el7 |
| `gimp-help-nn` | Red Hat:enterprise_linux:7::server | All versions | 0:2.8.2-1.el7 |

Products: Gimp Gimp.

## How do I fix CVE-2016-4994?

Apply the vendor's patch.

## Is CVE-2016-4994 being exploited?

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

## Other vulnerabilities in Gimp Gimp

- [CVE-2010-4541](https://insights.sbomify.com/CVE-2010-4541/): Memory corruption in n/a (critical 9.3)
- [CVE-2009-3909](https://insights.sbomify.com/CVE-2009-3909/): Integer overflow in n/a (critical 9.3)
- [CVE-2009-1570](https://insights.sbomify.com/CVE-2009-1570/): Integer overflow in n/a (critical 9.3)
- [CVE-2009-0723](https://insights.sbomify.com/CVE-2009-0723/): Integer overflow in n/a (critical 9.3)
- [CVE-2009-0733](https://insights.sbomify.com/CVE-2009-0733/): Memory corruption in n/a (critical 9.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2016-4994 and fix it if it is affected.

What it is: CVE-2016-4994 is a high-severity use after free vulnerability in Gimp Gimp, published on 12 Jul 2016. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2016-4994 in the wild and no public exploit code.

Affected product: Gimp Gimp. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-2016-4994/ (Markdown: https://insights.sbomify.com/CVE-2016-4994/index.md)
```

## Sources

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

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