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


Severity

Recommended
low

Based on Ubuntu security rating.

Threat Intelligence

EPSS
0.17% (7th 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-UBUNTU2204-PATCH-17920472
  • published26 Aug 2026
  • disclosed9 Jul 2026

Introduced: 9 Jul 2026

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

How to fix?

There is no fixed version for Ubuntu:22.04 patch.

NVD Description

Note: Versions mentioned in the description apply only to the upstream patch package and not the patch package as distributed by Ubuntu. See How to fix? for Ubuntu:22.04 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