Vulnerability · Published Jul 9, 2026 · Assigned by CERT-PL
CVE-2026-56289Loop with Unreachable Exit Condition in GNU patch
Medium 4.6
In plain English
A medium-severity infinite loop in patch from GNU. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.1% (higher than 2% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.24 | patch | 2.8.1-r0 | ALPINE-CVE-2026-56289 |
| Debian:12 | patch | no fix listed | DEBIAN-CVE-2026-56289 |
| Debian:13 | patch | no fix listed | DEBIAN-CVE-2026-56289 |
| Debian:14 | patch | no fix listed | DEBIAN-CVE-2026-56289 |
| Ubuntu:22.04:LTS | patch | no fix listed | UBUNTU-CVE-2026-56289 |
| Ubuntu:24.04:LTS | patch | no fix listed | UBUNTU-CVE-2026-56289 |
| Ubuntu:25.10 | patch | no fix listed | UBUNTU-CVE-2026-56289 |
| Ubuntu:26.04:LTS | patch | no fix listed | UBUNTU-CVE-2026-56289 |
| Ubuntu:26.10 | patch | no fix listed | UBUNTU-CVE-2026-56289 |
Affected products (as reported)
Weakness: CWE-835 · Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L