# CVE-2026-56288: NULL Pointer Dereference in GNU patch

- Severity: Medium 4.6 (CVSS:4.0, scored by CERT-PL) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.11%, higher than 1% of CVEs (2026-12-01)
- Published: 2026-07-09T09:29:07.947Z
- Modified: 2026-10-25T17:10:00.197Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: CERT-PL

## 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

(As written by CVE List.)

## Affected

- GNU patch: up to 2.8.0

## Every score

- CERT-PL: 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:N`
- NVD: 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`

## References

- <https://cert.pl/en/posts/2026/07/CVE-2026-56288> (third-party-advisory)
- <https://cgit.git.savannah.gnu.org/cgit/patch.git/> (patch, product)
- <https://cgit.git.savannah.gnu.org/cgit/patch.git/commit/?id=e6d6a4e021660679d7fc9150f981d4920f722313> (patch)

## Sources

- CVE List: [CVE-2026-56288](https://www.cve.org/CVERecord?id=CVE-2026-56288), CVE Terms of Use, modified 2026-07-09
- NVD: [CVE-2026-56288](https://nvd.nist.gov/vuln/detail/CVE-2026-56288), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-56288 · Whole record: https://cve.day/CVE-2026-56288.json · Rebuilt by cve.day 2026-11-25T22:59:27.490Z
