CVE-2026-56289

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
Configurations

Configuration 1 (hide)

cpe:2.3:a:gnu:patch:*:*:*:*:*:*:*:*

History

13 Jul 2026, 14:10

Type Values Removed Values Added
First Time Gnu
Gnu patch
References () https://cert.pl/en/posts/2026/07/CVE-2026-56288 - () https://cert.pl/en/posts/2026/07/CVE-2026-56288 - Third Party Advisory
References () https://cgit.git.savannah.gnu.org/cgit/patch.git/ - () https://cgit.git.savannah.gnu.org/cgit/patch.git/ - Patch
References () https://cgit.git.savannah.gnu.org/cgit/patch.git/commit/?id=faba04ef4f2b410257f76c1b9dc85e350929c4b9 - () https://cgit.git.savannah.gnu.org/cgit/patch.git/commit/?id=faba04ef4f2b410257f76c1b9dc85e350929c4b9 - Patch
CPE cpe:2.3:a:gnu:patch:*:*:*:*:*:*:*:*
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5

09 Jul 2026, 11:16

Type Values Removed Values Added
New CVE

Information

Published : 2026-07-09 11:16

Updated : 2026-07-13 14:10


NVD link : CVE-2026-56289

Mitre link : CVE-2026-56289

CVE.ORG link : CVE-2026-56289


JSON object : View

Products Affected

gnu

  • patch
CWE
CWE-835

Loop with Unreachable Exit Condition ('Infinite Loop')