| CVE ID | CVE-2026-56288 |
| Publication date | 09 July 2026 |
| Vendor | GNU |
| Product | patch |
| Vulnerable versions | All through 2.8.0 |
| Vulnerability type (CWE) | NULL Pointer Dereference (CWE-476) |
| Report source | Report to CERT Polska |
| CVE ID | CVE-2026-56289 |
| Publication date | 09 July 2026 |
| Vendor | GNU |
| Product | patch |
| Vulnerable versions | All through 2.8.0 |
| Vulnerability type (CWE) | Loop with Unreachable Exit Condition ('Infinite Loop') (CWE-835) |
| Report source | Report to CERT Polska |
Description
CERT Polska has received a report about vulnerabilities in GNU patch software and participated in coordination of their disclosure.
The vulnerability CVE-2026-56288: GNU patch is vulnerable to a NULL pointer dereference when processing a specially crafted unified-diff patch file. Improper handling of consecutive end-of-file newline markers can corrupt internal hunk (single block of changes in diff) data structures, causing the application to pass a NULL pointer to fwrite() during patch processing.
An attacker can trigger this condition with a malicious patch file, causing the utility to crash and resulting in a denial of service.
This issue has been fixed in the commit e6d6a4e021660679d7fc9150f981d4920f722313
The vulnerability 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 file 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
Credits
We thank Michał Majchrowicz and Marcin Wyczechowski from AFINE Team for the responsible vulnerability report.
More about the coordinated vulnerability disclosure process at CERT Polska can be found at https://cert.pl/en/cvd/.