# CVE-2026-42250: Off-by-One Leading to Out-of-Bounds Write in bzip2

> An off-by-one error in bzip2recover allows attackers to cause memory corruption and denial of service via a crafted file.

- **Severity:** Medium 4.8 (`CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N`)
- **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:** 28 May 2026
- **Updated:** 5 Jun 2026
- **Also known as:** AZL-88809, AZL-89190, BELL-CVE-2026-42250, CLSA-2026-1788430930, CLSA-2026-1788815685, DEBIAN-CVE-2026-42250, ECHO-dfc7-0c27-52d8, GHSA-9r29-3vrx-4537, MGASA-2026-0403, OESA-2026-2786, RHSA-2026:30268, ROOT-OS-DEBIAN-11-CVE-2026-42250, ROOT-OS-DEBIAN-12-CVE-2026-42250, ROOT-OS-DEBIAN-13-CVE-2026-42250, SUSE-SU-2026:23415-1, SUSE-SU-2026:23442-1, SUSE-SU-2026:23494-1, SUSE-SU-2026:23627-1, SUSE-SU-2026:3925-1, SUSE-SU-2026:4055-1, UBUNTU-CVE-2026-42250, USN-8685-1, openSUSE-SU-2026:11627-1, openSUSE-SU-2026:21762-1

## What is CVE-2026-42250?

CVE-2026-42250 is a medium-severity memory corruption vulnerability in bzip2, published on 28 May 2026. 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

bzip2 contains an off‑by‑one error in the bzip2recover utility. When processing a specially crafted file, the application performs an out‑of‑bounds write to a global buffer, resulting in memory corruption and a crash (denial of service).

This issue was fixed in bzip2 patch 35d122a3df8b0cc4082a4d89fdc6ee99f375fe67

Weakness: CWE-787 (Out-of-bounds Write)

## Which versions are affected by CVE-2026-42250?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `bzip2` | Red Hat:hummingbird:1 | All versions | 0:1.0.8-23.2.hum1 |
| `bzip2-devel` | Red Hat:hummingbird:1 | All versions | 0:1.0.8-23.2.hum1 |
| `bzip2-libs` | Red Hat:hummingbird:1 | All versions | 0:1.0.8-23.2.hum1 |
| `bzip2-static` | Red Hat:hummingbird:1 | All versions | 0:1.0.8-23.2.hum1 |
| `bzip2` | SUSE:Linux Enterprise Micro 5.3 | All versions | 1.0.8-150400.3.4.1 |
| `bzip2` | SUSE:Linux Enterprise Micro 5.4 | All versions | 1.0.8-150400.3.4.1 |
| `bzip2` | SUSE:Linux Enterprise Micro 5.5 | All versions | 1.0.8-150400.3.4.1 |
| `bzip2` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 1.0.8-150400.3.4.1 |
| `bzip2` | SUSE:Linux Enterprise Server 16.0 | All versions | 1.0.8-160000.3.1 |
| `bzip2` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 1.0.6-30.17.1 |
| `bzip2` | SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 1.0.8-160000.3.1 |
| `bzip2` | SUSE:Linux Micro 6.0 | All versions | 1.0.8-4.1 |
| `bzip2` | SUSE:Linux Micro 6.1 | All versions | 1.0.8-slfo.1.1_2.1 |
| `bzip2` | SUSE:Linux Micro 6.2 | All versions | 1.0.8-160000.3.1 |
| `bzip2` | openSUSE:Leap 16.0 | All versions | 1.0.8-160000.3.1 |
| `bzip2` | openSUSE:Tumbleweed | All versions | 1.0.8-6.1 |

## How do I fix CVE-2026-42250?

Apply the vendor's patch.

## Is CVE-2026-42250 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-42250 and fix it if it is affected.

What it is: CVE-2026-42250 is a medium-severity memory corruption vulnerability in bzip2, published on 28 May 2026. 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-2026-42250 in the wild and no public exploit code.

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

## Sources

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

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