CVE-2026-56289Loop with Unreachable Exit Condition in GNU patch
GNU patch is vulnerable to a denial of service (DoS) due to improper validation of hunk (single block of changes in diff) line offsets in unified-diff input. A specially crafted patch can specify an extremely large line number, causing the application to enter an effectively infinite processing loop while attempting to locate the requested position. This results in excessive CPU consumption and prevents the process from completing. An attacker can trigger this behavior by supplying a malicious patch file, causing the utility to become unresponsive and require manual termination. This issue has been fixed in the commit faba04ef4f2b410257f76c1b9dc85e350929c4b9
What to do
Fixed builds are available from Alpine: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | patch | Fix pending | UBUNTU-CVE-2026-56289 | |
| Ubuntu 26.04 | patch | Fix pending | UBUNTU-CVE-2026-56289 | |
| Ubuntu 25.10 | patch | Will not fix This is a DoS in a command line tool with little security impact, marking priority as low | UBUNTU-CVE-2026-56289 | |
| Ubuntu 24.04 | patch | Fix pending | UBUNTU-CVE-2026-56289 | |
| Ubuntu 22.04 | patch | Fix pending | UBUNTU-CVE-2026-56289 | |
| Ubuntu 20.04 | patch | Fix pending | UBUNTU-CVE-2026-56289 | |
| Ubuntu 18.04 | patch | Fix pending | UBUNTU-CVE-2026-56289 | |
| Ubuntu 16.04 | patch | Fix pending | UBUNTU-CVE-2026-56289 | |
| Ubuntu 14.04 | patch | Fix pending | UBUNTU-CVE-2026-56289 | |
| Debian 14 | patch | Will not fix Debian rates this unimportant for its packages (a minor issue, or one that doesn't affect Debian's build), so no security update is planned. | DEBIAN-CVE-2026-56289 | |
| Debian 13 | patch | Will not fix Debian rates this unimportant for its packages (a minor issue, or one that doesn't affect Debian's build), so no security update is planned. | DEBIAN-CVE-2026-56289 | |
| Debian 12 | patch | Will not fix Debian rates this unimportant for its packages (a minor issue, or one that doesn't affect Debian's build), so no security update is planned. | DEBIAN-CVE-2026-56289 | |
| Alpine Linux 3.24 | patch | Fixed | 2.8.1-r0 | ALPINE-CVE-2026-56289 |
What the vendor says
As published in the CVE record by CERT-PL, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- GNU patch: affected: up to 2.8.0
Vendor advisories:
References
- https://cert.pl/en/posts/2026/07/CVE-2026-56288
- https://cgit.git.savannah.gnu.org/cgit/patch.git/
- https://cgit.git.savannah.gnu.org/cgit/patch.git/commit/?id=faba04ef4f2b410257f76c1b9dc85e350929c4b9
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.