Skip to content
Heist/ feed
Back to feed
Medium

patch — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-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

Products
patch
Affected versions
2.7.1-3, 2.7.1-4, 2.7.1-4ubuntu1, 2.7.1-4ubuntu2, 2.7.1-4ubuntu2.3, 2.7.1-4ubuntu2.4, 2.7.1-4ubuntu2.4+esm1, 2.7.5-1, 2.7.5-1build1, 2.7.5-1ubuntu0.16.04.1, 2.7.5-1ubuntu0.16.04.2, 2.7.6-1, 2.7.6-2ubuntu1, 2.7.6-2ubuntu1.1, 2.7.6-6, 2.7.6-7, 2.7.6-7build1, 2.7.6-7build2, 2.7.6-7build3, 2.8-1, 2.8-2, 2.8-2build1
Fixed versions
Not specified
CVEs
CVE-2026-56288
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 02:46 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-56288

core-osv · Original source

Published 9 Jul 2026, 11:16 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:UBUNTU-CVE-2026-56288

patch

Fixed versions: Not specified

patch

Fixed versions: Not specified

patch

Fixed versions: Not specified

patch

Fixed versions: Not specified

patch

Fixed versions: Not specified

patch

Fixed versions: Not specified

patch

Fixed versions: Not specified

patch

Fixed versions: Not specified

patch

Fixed versions: Not specified

Complete source record
{
  "id": "d6ea6696f14373026e088aabf0643088431a44c140c3d8a9e75f7b49c4b17f57",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-56288",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-56288",
    "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:UBUNTU-CVE-2026-56288",
    "products": [
      {
        "name": {
          "value": "patch",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.7.1-3",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.7.1-4",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.7.1-4ubuntu1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.7.1-4ubuntu2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.7.1-4ubuntu2.3",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.7.1-4ubuntu2.4",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.7.1-4ubuntu2.4+esm1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "patch",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.7.5-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "2.7.5-1ubuntu0.16.04.1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "2.7.5-1ubuntu0.16.04.2",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "patch",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.7.5-1build1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "2.7.6-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "2.7.6-2ubuntu1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "2.7.6-2ubuntu1.1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "patch",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.7.6-6",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "patch",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.7.6-7",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "2.7.6-7build1",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "2.7.6-7build2",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "patch",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.7.6-7build2",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "2.7.6-7build3",
            "evidence": "/affected/5/versions"
          }
        ]
      },
      {
        "name": {
          "value": "patch",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.7.6-7build3",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "2.8-1",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "2.8-2",
            "evidence": "/affected/6/versions"
          }
        ]
      },
      {
        "name": {
          "value": "patch",
          "evidence": "/affected/7/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.8-2build1",
            "evidence": "/affected/7/versions"
          }
        ]
      },
      {
        "name": {
          "value": "patch",
          "evidence": "/affected/8/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.8-2",
            "evidence": "/affected/8/versions"
          },
          {
            "value": "2.8-2build1",
            "evidence": "/affected/8/versions"
          }
        ]
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "UBUNTU-CVE-2026-56288",
      "aliases": [
        "UBUNTU-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"
        },
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
        },
        {
          "type": "Ubuntu",
          "score": "low"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "patch",
            "purl": "pkg:deb/ubuntu/patch?arch=source&distro=esm-infra-legacy%2Ftrusty",
            "ecosystem": "Ubuntu:Pro:14.04:LTS"
          },
          "versions": [
            "2.7.1-3",
            "2.7.1-4",
            "2.7.1-4ubuntu1",
            "2.7.1-4ubuntu2",
            "2.7.1-4ubuntu2.3",
            "2.7.1-4ubuntu2.4",
            "2.7.1-4ubuntu2.4+esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-56288.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.7.1-4ubuntu2.4+esm1"
              }
            ],
            "priority_reason": "Only a crash in a command line tool"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "patch",
            "purl": "pkg:deb/ubuntu/patch?arch=source&distro=xenial",
            "ecosystem": "Ubuntu:16.04:LTS"
          },
          "versions": [
            "2.7.5-1",
            "2.7.5-1ubuntu0.16.04.1",
            "2.7.5-1ubuntu0.16.04.2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-56288.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.7.5-1ubuntu0.16.04.2"
              }
            ],
            "priority_reason": "Only a crash in a command line tool"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "patch",
            "purl": "pkg:deb/ubuntu/patch?arch=source&distro=bionic",
            "ecosystem": "Ubuntu:18.04:LTS"
          },
          "versions": [
            "2.7.5-1build1",
            "2.7.6-1",
            "2.7.6-2ubuntu1",
            "2.7.6-2ubuntu1.1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-56288.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.7.6-2ubuntu1.1"
              }
            ],
            "priority_reason": "Only a crash in a command line tool"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "patch",
            "purl": "pkg:deb/ubuntu/patch?arch=source&distro=focal",
            "ecosystem": "Ubuntu:20.04:LTS"
          },
          "versions": [
            "2.7.6-6"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-56288.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.7.6-6"
              }
            ],
            "priority_reason": "Only a crash in a command line tool"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "patch",
            "purl": "pkg:deb/ubuntu/patch?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "2.7.6-7",
            "2.7.6-7build1",
            "2.7.6-7build2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-56288.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.7.6-7build2"
              }
            ],
            "priority_reason": "Only a crash in a command line tool"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "patch",
            "purl": "pkg:deb/ubuntu/patch?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "2.7.6-7build2",
            "2.7.6-7build3"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-56288.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.7.6-7build3"
              }
            ],
            "priority_reason": "Only a crash in a command line tool"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "patch",
            "purl": "pkg:deb/ubuntu/patch?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "2.7.6-7build3",
            "2.8-1",
            "2.8-2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-56288.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.8-2"
              }
            ],
            "priority_reason": "Only a crash in a command line tool"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "patch",
            "purl": "pkg:deb/ubuntu/patch?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "2.8-2build1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-56288.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.8-2build1"
              }
            ],
            "priority_reason": "Only a crash in a command line tool"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "patch",
            "purl": "pkg:deb/ubuntu/patch?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "2.8-2",
            "2.8-2build1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-56288.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.8-2build1"
              }
            ],
            "priority_reason": "Only a crash in a command line tool"
          }
        }
      ],
      "modified": "2026-10-17T12:59:09.942251391Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-56288"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-56288",
        "https://www.cve.org/CVERecord?id=CVE-2026-56288",
        "https://cert.pl/en/posts/2026/07/CVE-2026-56288"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-56288",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/1/score"
  },
  "source_id": "core-osv",
  "document_id": 359366,
  "published_at": "2026-07-09T11:16:00+00:00"
}