# CVE-2026-56289: Loop with Unreachable Exit Condition in GNU patch

- Priority: **Routine**
- Reason: Not severe (CVSS 4.6, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-07-09 · Modified: 2026-07-09
- Aliases: RHSA-2026:37468, UBUNTU-CVE-2026-56289, DEBIAN-CVE-2026-56289, ALPINE-CVE-2026-56289
- Record: https://cvemate.com/vulnerability/CVE-2026-56289 · JSON: https://cvemate.com/vulnerability/CVE-2026-56289/json

## Description

```text
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
```

## Signals

- CVSS: 5.5 medium (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.115%, percentile 1.685%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine patch (Alpine Linux): \< 2.8.1-r0
- debian patch (Debian): All versions (No fix recorded)
- ubuntu patch (Ubuntu): All versions (No fix recorded)
- gnu patch: ≤ 2.8.0
- redhat patch (Red Hat): \< 0:2.8-4.2.hum1

## 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>
- <https://access.redhat.com/errata/RHSA-2026:37468>
- <https://access.redhat.com/security/cve/CVE-2026-56289>
- <https://access.redhat.com/security/updates/classification/>
- <https://images.redhat.com/>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_37468.json>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2498462>
- <https://www.cve.org/CVERecord?id=CVE-2026-56289>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-56289>
- <https://ubuntu.com/security/CVE-2026-56289>
- <https://security-tracker.debian.org/tracker/CVE-2026-56289>
- <https://security.alpinelinux.org/vuln/CVE-2026-56289>

---

Data as of 2026-12-05T03:09:34.052Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
