Skip to content
Heist/ feed
Back to feed
Medium

NULL Pointer Dereference in GNU patch

Type: advisorySources: OSV

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

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-56288
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 17:13 UTC · Revision 1

Source evidence

NULL Pointer Dereference in GNU patch

core-osv · Original source

Published 9 Jul 2026, 09:29 UTC

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

osv:CVE-2026-56288
Complete source record
{
  "id": "360e226ea3a56bd3f2f7fcf38219e7b0ee120fbaf6bf6a07bd9a853fd717be67",
  "url": "https://osv.dev/vulnerability/CVE-2026-56288",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "NULL Pointer Dereference in GNU patch",
    "summary": "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",
    "evidence": "osv:CVE-2026-56288",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-56288",
      "aliases": [
        "CVE-2026-56288"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://cgit.git.savannah.gnu.org/cgit/patch.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "e6d6a4e021660679d7fc9150f981d4920f722313"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "fixed": "e6d6a4e021660679d7fc9150f981d4920f722313"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-56288.json"
          }
        }
      ],
      "modified": "2026-10-31T10:31:00.304307982Z",
      "provider": "osv",
      "references": [
        "https://cgit.git.savannah.gnu.org/cgit/patch.git/",
        "https://cert.pl/en/posts/2026/07/CVE-2026-56288",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56288.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-56288",
        "https://cgit.git.savannah.gnu.org/cgit/patch.git/commit/?id=e6d6a4e021660679d7fc9150f981d4920f722313"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-476"
        ],
        "cna_assigner": "CERT-PL",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "last_affected": "2.8.0"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56288.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-56288",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 460115,
  "published_at": "2026-07-09T09:29:07.947+00:00"
}