CVE catalog

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 e

[CVE catalog]

Severity
Medium · CVSS 5.5CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Published
Source
[NVD] · [CVE record]
EPSS
0.11% · Oct 25, 2026

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

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianpatchsid2.8.1-1vulnerable
Debianpatchforky2.8.1-1vulnerable
Debianpatchtrixie2.8-2vulnerable
Debianpatchbookworm2.7.6-7vulnerable
CpepatchNot reportedNot reportedvulnerable
CpepatchNot reportedNot reportedunknown

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianpatchsourcesid(unfixed)unimportantNot reportedNot reported
Debianpatchsourceforky(unfixed)unimportantNot reportedNot reported
Debianpatchsourcetrixie(unfixed)unimportantNot reportedNot reported
Debianpatchsourcebookworm(unfixed)unimportantNot reportedNot reported

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [patch]Affected
    Details (2)
    • 2.7.6-7 · amd64 · bookworm

      Affected

      nvd · patch · debian · bookworm; nvd · patch · debian · 12

    • 2.7.6-7 · arm64 · bookworm

      Affected

      nvd · patch · debian · bookworm; nvd · patch · debian · 12

[Debian 13 (Trixie)]

  • [patch]Affected
    Details (2)
    • 2.8-2 · amd64 · trixie

      Affected

      nvd · patch · debian · 13

    • 2.8-2 · arm64 · trixie

      Affected

      nvd · patch · debian · 13

Observed:

References