4.6medium
Loop with Unreachable Exit Condition in GNU patch
- Severity
- 4.6medium CVSS:4.0 by CERT-PL
- Exploit likelihood
- 0.11% (higher than 1% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- CERT-PL
Description
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
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| GNU patch | up to 2.8.0 | CVE List, NVD |
All scores
| CERT-PL | 4.6medium CVSS:4.0 | 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 |
| NVD | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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
NVD (es)
GNU patch es vulnerable a una denegación de servicio (DoS) debido a una validación incorrecta de los desplazamientos de línea de los hunks (bloque único de cambios en un diff) en la entrada unified-diff. Un parche especialmente diseñado puede especificar un número de línea extremadamente grande, lo que hace que la aplicación entre en un bucle de procesamiento efectivamente infinito mientras intenta localizar la posición solicitada. Esto resulta en un consumo excesivo de CPU y evita que el proceso se complete. Un atacante puede desencadenar este comportamiento al proporcionar un archivo de parche malicioso, lo que hace que la utilidad deje de responder y requiera una terminación manual. Este problema ha sido solucionado en el commit faba04ef4f2b410257f76c1b9dc85e350929c4b9
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-56289 changed 2026-07-09 | CVE Terms of Use |
| NVD | CVE-2026-56289 changed 2026-10-25 | Public domain |