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

> Remote attackers can cause a denial of service via a crafted bzip2 file due to a use-after-free error in bzip2recover.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/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:** 30 Jun 2016
- **Updated:** 14 Oct 2026
- **Also known as:** ALPINE-CVE-2016-3189, CLEANSTART-2026-JO91864, DEBIAN-CVE-2016-3189, GHSA-mg3q-2g68-qp7w, JLSEC-2025-10, MGASA-2016-0400, PSF-2016-5, SUSE-SU-2019:1206-1, SUSE-SU-2019:1206-2, UBUNTU-CVE-2016-3189, openSUSE-SU-2019:1398-1, openSUSE-SU-2019:1435-1

## What is CVE-2016-3189?

CVE-2016-3189 is a medium-severity use after free vulnerability in Python Python, published on 30 Jun 2016. 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

Use-after-free vulnerability in bzip2recover in bzip2 1.0.6 allows remote attackers to cause a denial of service (crash) via a crafted bzip2 file, related to block ends set to before the start of the block.

Weakness: CWE-416 (Use After Free)

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

It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `bzip2` | SUSE:Linux Enterprise Module for Basesystem 15 | All versions | 1.0.6-5.3.1 |
| `bzip2` | SUSE:Linux Enterprise Module for Basesystem 15 SP1 | All versions | 1.0.6-5.3.1 |
| `bzip2` | openSUSE:Leap 15.0 | All versions | 1.0.6-lp150.4.3.1 |
| `bzip2` | openSUSE:Leap 15.1 | All versions | 1.0.6-lp151.5.3.1 |

Products: Bzip Bzip2, Python Python.

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

Apply the vendor's patch.

## Is CVE-2016-3189 being exploited?

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

## Other vulnerabilities in Python Python

- [CVE-2019-12900](https://insights.sbomify.com/CVE-2019-12900/): Memory corruption in n/a (critical 9.8)
- [CVE-2010-0405](https://insights.sbomify.com/CVE-2010-0405/): Integer overflow in n/a (medium 5.1)
- [CVE-2002-0759](https://insights.sbomify.com/CVE-2002-0759/): Path traversal in n/a (medium 5.0)
- [CVE-2011-4089](https://insights.sbomify.com/CVE-2011-4089/): Race condition in n/a (medium 4.6)
- [CVE-2008-1372](https://insights.sbomify.com/CVE-2008-1372/): Memory corruption in n/a (medium 4.3)

## Fix prompt for AI coding agents

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

What it is: CVE-2016-3189 is a medium-severity use after free vulnerability in Python Python, published on 30 Jun 2016. 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-2016-3189 in the wild and no public exploit code.

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

## Sources

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

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