Search vulnerabilities

Results 15

Export CSV
CVE-2026-56289

Loop with Unreachable Exit Condition in GNU patch

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 4.0 · 4.6 Medium EPSS < 1% KEV · Not listed
Vendors
Gnu
Products
CVE-2026-56288

NULL Pointer Dereference in GNU patch

GNU patch is vulnerable to a NULL pointer dereference when processing a specially crafted unified-diff patch file. Improper handling of consecutive end-of-file newline markers can corrupt internal hunk (single block of changes in diff) data structures, causing the application to pass a NULL pointer to fwrite() during patch processing. An attacker can trigger this condition with a malicious patch file, causing the utility to crash and resulting in a denial of service. This issue has been fixed in the commit e6d6a4e021660679d7fc9150f981d4920f722313

CVSS 4.0 · 4.6 Medium EPSS < 1% KEV · Not listed
Vendors
Gnu
Products
CVE-2014-9637

patch: local denial of service with a crafted patch

GNU patch 2.7.2 and earlier allows remote attackers to cause a denial of service (memory consumption and segmentation fault) via a crafted diff file.

CVSS 3.0 · 5.5 Medium EPSS 2.4% KEV · Not listed
Vendors
Products
CVE-2015-1395

patch: directory traversal via file rename

Directory traversal vulnerability in GNU patch versions which support Git-style patching before 2.7.3 allows remote attackers to write to arbitrary files with the permissions of the target user via a .. (dot dot) in a diff file name.

CVSS 3.0 · 7.5 High EPSS 11.3% KEV · Not listed
CVE-2018-1000156

patch: Malicious patch files cause ed to execute arbitrary commands

GNU Patch version 2.7.6 contains an input validation vulnerability when processing patch files, specifically the EDITOR_PROGRAM invocation (using ed) can result in code execution. This attack appear to be exploitable via a patch file processed via the patch utility. This is similar to FreeBSD's CVE-2015-1418 however although they share a common ancestry the code bases have diverged over time.

CVSS 3.0 · 7.8 High EPSS 5.3% KEV · Not listed
Vendors
Canonical Debian Gnu and 1 more
Products
CVE-2015-1196

patch: directory traversal via symlinks

GNU patch 2.7.1 allows remote attackers to write to arbitrary files via a symlink attack in a patch file.

CVSS 2.0 · 4.3 Medium EPSS 6.1% KEV · Not listed
Vendors
CVE-2021-45261

patch: Invalid Pointer via another_hunk function

An Invalid Pointer vulnerability exists in GNU patch 2.7 via the another_hunk function, which causes a Denial of Service.

CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
Vendors
Gnu
Products
CVE-2019-20633

patch: double free in another_hunk function in pch.c

GNU patch through 2.7.6 contains a free(p_line[p_end]) Double Free vulnerability in the function another_hunk in pch.c that can cause a denial of service via a crafted patch file. NOTE: this issue exists because of an incomplete fix for CVE-2018-6952.

CVSS 3.1 · 5.5 Medium EPSS 1.0% KEV · Not listed
Vendors
Gnu
Products
CVE-2019-13638

patch: OS shell command injection when processing crafted patch files

GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by opening a crafted patch file that contains an ed style diff payload with shell metacharacters. The ed editor does not need to be present on the vulnerable system. This is different from CVE-2018-1000156.

CVSS 3.0 · 7.8 High EPSS 4.5% KEV · Not listed
Vendors
Products
CVE-2019-13636

patch: the following of symlinks in inp.c and util.c is mishandled in cases other than input files

In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. This affects inp.c and util.c.

CVSS 3.0 · 5.9 Medium EPSS 3.9% KEV · Not listed
Vendors
CVE-2018-6952

patch: Double free of memory in pch.c:another_hunk() causes a crash

A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6.

CVSS 3.0 · 7.5 High EPSS 8.2% KEV · Not listed
Vendors
CVE-2018-6951

patch: NULL pointer dereference in pch.c:intuit_diff_type() causes a crash

An issue was discovered in GNU patch through 2.7.6. There is a segmentation fault, associated with a NULL pointer dereference, leading to a denial of service in the intuit_diff_type function in pch.c, aka a "mangled rename" issue.

CVSS 3.0 · 7.5 High EPSS 8.4% KEV · Not listed
Vendors
Products
CVE-2018-20969

patch: do_ed_script in pch.c does not block strings beginning with a ! character

do_ed_script in pch.c in GNU patch through 2.7.6 does not block strings beginning with a ! character. NOTE: this is the same commit as for CVE-2019-13638, but the ! syntax is specific to ed, and is unrelated to a shell metacharacter.

CVSS 3.0 · 7.8 High EPSS 2.7% KEV · Not listed
Vendors
Products
CVE-2016-10713

patch: Out-of-bounds access in pch_write_line function in pch.c

An issue was discovered in GNU patch before 2.7.6. Out-of-bounds access within pch_write_line() in pch.c can possibly lead to DoS via a crafted input file.

CVSS 3.0 · 5.5 Medium EPSS 1.6% KEV · Not listed
Vendors
CVE-2015-1396

patch: directory traversal via symlinks (incomplete fix for CVE-2015-1196)

A Directory Traversal vulnerability exists in the GNU patch before 2.7.4. A remote attacker can write to arbitrary files via a symlink attack in a patch file. NOTE: this issue exists because of an incomplete fix for CVE-2015-1196.

CVSS 3.1 · 7.5 High EPSS 3.3% KEV · Not listed
Vendors
Products