Read the docs
TI-2026-40654 Aliases CVE-2026-56289GHSA-3m3r-f94v-4mf8

Loop with Unreachable Exit Condition in GNU patch

Priority LOW 20CWE-835Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Active
Attack complexity
Low
Attack requirements
None
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · Low
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-835.

Summary

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

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00115 1st percentileScored 2026-11-07
Fix Fixed Red Hat: 1 advisory

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
GNUpatchup to 2.8.0—No fix listedCNA
  • patch VendorGNU Affected up to 2.8.0 Fixed in — No fix listed CNA

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:gnu:patch:*:*:*:*:*:*:*:*up to 2.8.0VulnerableGNU
  • cpe:2.3:a:gnu:patch:*:*:*:*:*:*:*:* Versions up to 2.8.0 Vulnerable ·GNU

Remediation

Red Hat 1 advisory

  • RHSA-2026:37468 Released 2026-07-10 · Red Hat rating Moderate
    Red Hat Hardened Images RPMs Security Update
    • Red Hat Hardened Images patch-2.8-4.2.hum1@aarch64, patch-2.8-4.2.hum1@src, patch-2.8-4.2.hum1@x86_64

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Hardened ImagesFixed RHSA-2026:37468

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-56289
  2. 2026-10-03 Alias added: GHSA-3m3r-f94v-4mf8

References

  • TI-2015-01271 Directory traversal vulnerability in GNU patch versions which support Git-style patching… CVSS 3.0HIGH 7.5
  • TI-2018-05076 A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6. CVSS 3.0HIGH 7.5
  • TI-2018-05075 An issue was discovered in GNU patch through 2.7.6. CVSS 3.0HIGH 7.5
  • TI-2018-15808 GNU Patch version 2.7.6 contains an input validation vulnerability when processing patch… CVSS 3.0HIGH 7.8
  • TI-2019-10248 GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited… CVSS 3.0HIGH 7.8
  • TI-2018-14931 do_ed_script in pch.c in GNU patch through 2.7.6 does not block strings beginning with a… CVSS 3.0HIGH 7.8
See all 14 →

Sources