Vulnerability · Published Jul 9, 2026 · Assigned by CERT-PL
CVE-2026-56288NULL Pointer Dereference in GNU patch
Medium 4.6
In plain English
A medium-severity null pointer dereference in patch from GNU. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.1% (higher than 2% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.24 | patch | 2.8.1-r0 | ALPINE-CVE-2026-56288 |
| Debian:12 | patch | no fix listed | DEBIAN-CVE-2026-56288 |
| Debian:13 | patch | no fix listed | DEBIAN-CVE-2026-56288 |
| Debian:14 | patch | no fix listed | DEBIAN-CVE-2026-56288 |
| Ubuntu:22.04:LTS | patch | no fix listed | UBUNTU-CVE-2026-56288 |
| Ubuntu:24.04:LTS | patch | no fix listed | UBUNTU-CVE-2026-56288 |
| Ubuntu:25.10 | patch | no fix listed | UBUNTU-CVE-2026-56288 |
| Ubuntu:26.04:LTS | patch | no fix listed | UBUNTU-CVE-2026-56288 |
| Ubuntu:26.10 | patch | no fix listed | UBUNTU-CVE-2026-56288 |
Affected products (as reported)
Weakness: CWE-476 · Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N