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
{
"sources": [
{
"html_url": "https://nvd.nist.gov/vuln/detail/CVE-2026-56288",
"id": "CVE-2026-56288",
"modified": "2026-07-13T14:08:47.080Z",
"published": "2026-07-09T11:16:40.713Z",
"imported": "2026-08-12T14:25:16.666Z",
"url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-56288",
"database_specific": {
"status": "Analyzed"
}
},
{
"html_url": "https://github.com/advisories/GHSA-m3j2-9m66-r96h",
"modified": "2026-07-13T15:31:42Z",
"id": "GHSA-m3j2-9m66-r96h",
"imported": "2026-08-12T14:25:19.590Z",
"published": "2026-07-09T12:30:28Z",
"url": "https://api.github.com/advisories/GHSA-m3j2-9m66-r96h"
},
{
"html_url": "https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-42556",
"modified": "2026-07-09T12:57:48Z",
"published": "2026-07-09T09:29:07Z",
"imported": "2026-08-12T14:25:18.032Z",
"id": "EUVD-2026-42556",
"url": "https://euvdservices.enisa.europa.eu/api/enisaid?id=EUVD-2026-42556"
}
],
"license": "CC-BY-4.0"
}