CVE-2026-56289

Name
CVE-2026-56289
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
NVD Severity
unknown
Other trackers
Mailing lists
Exploits
Forges
GitHub (code, issues), Aports (code, issues)

References

Type URI
cvd@cert.pl https://cert.pl/en/posts/2026/07/CVE-2026-56288
cvd@cert.pl https://cgit.git.savannah.gnu.org/cgit/patch.git/
cvd@cert.pl https://cgit.git.savannah.gnu.org/cgit/patch.git/commit/?id=faba04ef4f2b410257f76c1b9dc85e350929c4b9

Match rules

CPE URI Source package Min version Max version
cpe:2.3:a:gnu:patch:*:*:*:*:*:*:*:* patch >= None <= 2.8.0

Vulnerable and fixed packages

Source package Branch Version Maintainer Status
patch edge-main 2.8-r0 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable
patch edge-main 2.7.6-r10 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable
patch edge-main 2.7.6-r9 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable
patch edge-main 2.7.6-r8 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable
patch edge-main 2.7.6-r7 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable
patch edge-main 2.7.6-r6 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable
patch edge-main 2.7.6-r5 None possibly vulnerable
patch edge-main 2.7.6-r4 None possibly vulnerable
patch edge-main 2.7.6-r2 None possibly vulnerable
patch 3.24-main 2.8-r0 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable
patch 3.23-main 2.8-r0 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable
patch 3.22-main 2.8-r0 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable
patch 3.22-main 2.7.6-r7 None possibly vulnerable
patch 3.22-main 2.7.6-r6 None possibly vulnerable
patch 3.22-main 2.7.6-r5 None possibly vulnerable
patch 3.22-main 2.7.6-r4 None possibly vulnerable
patch 3.22-main 2.7.6-r2 None possibly vulnerable
patch 3.21-main 2.7.6-r10 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable
patch 3.21-main 2.7.6-r7 None possibly vulnerable
patch 3.21-main 2.7.6-r6 None possibly vulnerable
patch 3.21-main 2.7.6-r5 None possibly vulnerable
patch 3.21-main 2.7.6-r4 None possibly vulnerable
patch 3.21-main 2.7.6-r2 None possibly vulnerable
patch 3.20-main 2.7.6-r10 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable
patch 3.20-main 2.7.6-r7 None possibly vulnerable
patch 3.20-main 2.7.6-r6 None possibly vulnerable
patch 3.20-main 2.7.6-r5 None possibly vulnerable
patch 3.20-main 2.7.6-r4 None possibly vulnerable
patch 3.20-main 2.7.6-r2 None possibly vulnerable
patch 3.19-main 2.7.6-r10 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable
patch 3.19-main 2.7.6-r7 None possibly vulnerable
patch 3.19-main 2.7.6-r6 None possibly vulnerable
patch 3.19-main 2.7.6-r5 None possibly vulnerable
patch 3.19-main 2.7.6-r4 None possibly vulnerable
patch 3.19-main 2.7.6-r2 None possibly vulnerable