Loop with Unreachable Exit Condition ('Infinite Loop') Affecting patch package, versions *


Severity

Recommended
low

Based on Debian security rating.

Threat Intelligence

EPSS
0.12% (2nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIAN11-PATCH-17921862
  • published10 Jul 2026
  • disclosed9 Jul 2026

Introduced: 9 Jul 2026

NewCVE-2026-56289  (opens in a new tab)
CWE-835  (opens in a new tab)

How to fix?

There is no fixed version for Debian:11 patch.

NVD Description

Note: Versions mentioned in the description apply only to the upstream patch package and not the patch package as distributed by Debian. See How to fix? for Debian:11 relevant fixed versions and status.

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

CVSS Base Scores

version 3.1