cve.bz

CVE-2026-56289 gnu patch: Infinite Loop

4.6 mediumEPSS 0.1%Fix available

Medium (4.6) in gnu patch. EPSS 0.1% estimated probability of exploitation activity in the next 30 days.

On this page
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

Severity

CVSS 4.0

4.6 medium
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

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
0.1% (unchanged from 0.1% a week ago; 0.1% 30 days ago) estimated probability of exploitation activity in the next 30 days; 2nd percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-07-09. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-835 Loop with Unreachable Exit Condition (Infinite Loop)
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-56289 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-56289?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-56289?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-56289 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2026-56289

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2026-56289](https://cve.bz/cve/badge/CVE-2026-56289.svg)](https://cve.bz/cve/CVE-2026-56289)

HTML:

<a href="https://cve.bz/cve/CVE-2026-56289"><img src="https://cve.bz/cve/badge/CVE-2026-56289.svg" alt="CVE-2026-56289"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
GNU patchthrough 2.8.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14patchno fix listedDEBIAN-CVE-2026-56289
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 6 morepatchno fix listedUBUNTU-CVE-2026-56289
Red Hathummingbird:1patch0:2.8-4.2.hum1RHSA-2026:37468
SUSELinux Enterprise Module for Basesystem 15 SP7patch2.7.6-150000.5.12.1SUSE-SU-2026:3161-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0patch2.7.6-160000.4.1SUSE-SU-2026:22651-1
SUSELinux Enterprise Server LTSS Extended Security 12 SP5patch2.7.5-8.14.1SUSE-SU-2026:2922-1
SUSELinux Micro 6.0patch2.7.6-4.1SUSE-SU-2026:23210-1
SUSELinux Micro 6.1patch2.7.6-slfo.1.1_2.1SUSE-SU-2026:22905-1
SUSELinux Micro 6.2patch2.7.6-160000.4.1SUSE-SU-2026:22604-1
openSUSELeap 16.0patch2.7.6-160000.4.1openSUSE-SU-2026:21332-1
openSUSETumbleweedpatch2.8-3.1openSUSE-SU-2026:11260-1
Alpinev3.24patch2.8.1-r0ALPINE-CVE-2026-56289
Azure Linux3patch2.7.6-10AZL-92151
Alpaquita23patch2.7.6-r10BELL-CVE-2026-56289
Alpaquita25, streampatch2.8.1-r0BELL-CVE-2026-56289
BellSoft Hardened Containers23patch2.7.6-r10BELL-CVE-2026-56289
BellSoft Hardened Containers25, streampatch2.8.1-r0BELL-CVE-2026-56289

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita · BellSoft Hardened Containers.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

A moderate denial of service vulnerability was found in GNU patch, which ships in Red Hat Hardened Images. GNU patch does not properly validate hunk (single block of changes in diff) line offsets in unified-diff input: a specially crafted patch file that declares an extremely large line number causes the utility to enter an effectively infinite processing loop while attempting to locate the requested position, resulting in excessive CPU consumption and leaving the process unresponsive until it is manually terminated. Exploitation requires that a user or automated process apply the attacker-supplied malicious patch file; consequently Red Hat rates this flaw with a local attack vector and required user interaction (CVSS 5.5, CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H), whereas the upstream record characterizes the attacker as remote. Both assessments rate the overall severity as moderate. The Red Hat Hardened Images product is affected, and a fix is being pursued through the delegated resolution process.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

ProductPackageStateAdvisory
Red Hat Hardened Imagespatch-main-2.8-4.2.hum1Fixed 2026-07-10RHSA-2026:37468

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-56289.

References

Check your stackJSON