Skip to content
Heist/ feed
Back to feed
Medium

patch — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2026-56289

GNU patch is vulnerable to a denial of service (DoS) due to improper validation of hunk (single block of changes in diff) line offsets in unified-diff input. A specially crafted patch can specify an extremely large line number, causing the application to enter an effectively infinite processing loop while attempting to locate the requested position. This results in excessive CPU consumption and prevents the process from completing. An attacker can trigger this behavior by supplying a malicious patch file, causing the utility to become unresponsive and require manual termination. This issue has been fixed in the commit faba04ef4f2b410257f76c1b9dc85e350929c4b9

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-56289
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 02:46 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-56289

core-osv · Original source

Published 9 Jul 2026, 11:16 UTC

GNU patch is vulnerable to a denial of service (DoS) due to improper validation of hunk (single block of changes in diff) line offsets in unified-diff input. A specially crafted patch can specify an extremely large line number, causing the application to enter an effectively infinite processing loop while attempting to locate the requested position. This results in excessive CPU consumption and prevents the process from completing. An attacker can trigger this behavior by supplying a malicious patch file, causing the utility to become unresponsive and require manual termination. This issue has been fixed in the commit faba04ef4f2b410257f76c1b9dc85e350929c4b9

osv:UBUNTU-CVE-2026-56289

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": "158d40501e22da45df11e40e8dbb576c9d7ab048705dcee54d69bbb8ed9cd6c6",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-56289",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-56289",
    "summary": "GNU patch is vulnerable to a denial of service (DoS) due to improper validation of hunk (single block of changes in diff) line offsets in unified-diff input. A specially crafted patch can specify an extremely large line number, causing the application to enter an effectively infinite processing loop while attempting to locate the requested position. This results in excessive CPU consumption and prevents the process from completing. An attacker can trigger this behavior by supplying a malicious patch file, causing the utility to become unresponsive and require manual termination. This issue has been fixed in the commit faba04ef4f2b410257f76c1b9dc85e350929c4b9",
    "evidence": "osv:UBUNTU-CVE-2026-56289",
    "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-56289",
      "aliases": [
        "UBUNTU-CVE-2026-56289"
      ],
      "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:L"
        },
        {
          "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-56289.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.7.1-4ubuntu2.4+esm1"
              }
            ],
            "priority_reason": "Only a DoS 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-56289.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.7.5-1ubuntu0.16.04.2"
              }
            ],
            "priority_reason": "Only a DoS 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-56289.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.7.6-2ubuntu1.1"
              }
            ],
            "priority_reason": "Only a DoS 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-56289.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.7.6-6"
              }
            ],
            "priority_reason": "Only a DoS 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-56289.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.7.6-7build2"
              }
            ],
            "priority_reason": "Only a DoS 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-56289.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.7.6-7build3"
              }
            ],
            "priority_reason": "Only a DoS 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-56289.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.8-2"
              }
            ],
            "priority_reason": "Only a DoS 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-56289.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.8-2build1"
              }
            ],
            "priority_reason": "Only a DoS 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-56289.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "patch",
                "binary_version": "2.8-2build1"
              }
            ],
            "priority_reason": "Only a DoS in a command line tool"
          }
        }
      ],
      "modified": "2026-10-17T12:59:09.941449935Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-56289"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-56289",
        "https://www.cve.org/CVERecord?id=CVE-2026-56289",
        "https://cert.pl/en/posts/2026/07/CVE-2026-56288"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-56289",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/1/score"
  },
  "source_id": "core-osv",
  "document_id": 359365,
  "published_at": "2026-07-09T11:16:00+00:00"
}