CVE-2018-1000156
patch: Malicious patch files cause ed to execute arbitrary commands
Severity
ImportantRed Hat Product Security
CVSS 3.0
Review impact separately from score.
Published · April 5, 2018
Updated · November 21, 2025
Description
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 score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.0 · 7.8CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CWE-77 · Improper Neutralization of Special Elements used in a Command ('Command Injection')