CVE-2018-1000156
HIGH 7.8CVSS 3.0GNU 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.
- Published
- 6 Apr 2018
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-20
- Sources
- NVDJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.0 | HIGH 7.8 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 6.8 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | gnu | patchcpe:2.3:a:gnu:patch:2.7.6:*:*:*:*:*:*:* |
= 2.7.6 | |
| NVD | canonical | ubuntu_linuxcpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:* |
= 12.04 | |
| NVD | canonical | ubuntu_linuxcpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:* |
= 14.04 | |
| NVD | canonical | ubuntu_linuxcpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:* |
= 16.04 | |
| NVD | canonical | ubuntu_linuxcpe:2.3:o:canonical:ubuntu_linux:17.10:*:*:*:*:*:*:* |
= 17.10 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:* |
= 7.0 | |
| NVD | redhat | enterprise_linux_desktopcpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:* |
= 6.0 | |
| NVD | redhat | enterprise_linux_desktopcpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:* |
= 7.0 | |
| NVD | redhat | enterprise_linux_servercpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:* |
= 6.0 | |
| NVD | redhat | enterprise_linux_servercpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:* |
= 7.0 | |
| NVD | redhat | enterprise_linux_server_auscpe:2.3:o:redhat:enterprise_linux_server_aus:6.4:*:*:*:*:*:*:* |
= 6.4 | |
| NVD | redhat | enterprise_linux_server_auscpe:2.3:o:redhat:enterprise_linux_server_aus:6.5:*:*:*:*:*:*:* |
= 6.5 | |
| NVD | redhat | enterprise_linux_server_auscpe:2.3:o:redhat:enterprise_linux_server_aus:6.6:*:*:*:*:*:*:* |
= 6.6 | |
| NVD | redhat | enterprise_linux_server_auscpe:2.3:o:redhat:enterprise_linux_server_aus:7.2:*:*:*:*:*:*:* |
= 7.2 | |
| NVD | redhat | enterprise_linux_server_auscpe:2.3:o:redhat:enterprise_linux_server_aus:7.3:*:*:*:*:*:*:* |
= 7.3 | |
| NVD | redhat | enterprise_linux_server_auscpe:2.3:o:redhat:enterprise_linux_server_aus:7.4:*:*:*:*:*:*:* |
= 7.4 | |
| NVD | redhat | enterprise_linux_server_auscpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:* |
= 7.6 | |
| NVD | redhat | enterprise_linux_server_euscpe:2.3:o:redhat:enterprise_linux_server_eus:6.7:*:*:*:*:*:*:* |
= 6.7 | |
| NVD | redhat | enterprise_linux_server_euscpe:2.3:o:redhat:enterprise_linux_server_eus:7.3:*:*:*:*:*:*:* |
= 7.3 | |
| NVD | redhat | enterprise_linux_server_euscpe:2.3:o:redhat:enterprise_linux_server_eus:7.4:*:*:*:*:*:*:* |
= 7.4 | |
| NVD | redhat | enterprise_linux_server_euscpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:* |
= 7.5 | |
| NVD | redhat | enterprise_linux_server_euscpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:* |
= 7.6 | |
| NVD | redhat | enterprise_linux_server_tuscpe:2.3:o:redhat:enterprise_linux_server_tus:6.6:*:*:*:*:*:*:* |
= 6.6 | |
| NVD | redhat | enterprise_linux_server_tuscpe:2.3:o:redhat:enterprise_linux_server_tus:7.2:*:*:*:*:*:*:* |
= 7.2 | |
| NVD | redhat | enterprise_linux_server_tuscpe:2.3:o:redhat:enterprise_linux_server_tus:7.3:*:*:*:*:*:*:* |
= 7.3 | |
| NVD | redhat | enterprise_linux_server_tuscpe:2.3:o:redhat:enterprise_linux_server_tus:7.4:*:*:*:*:*:*:* |
= 7.4 | |
| NVD | redhat | enterprise_linux_server_tuscpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:* |
= 7.6 | |
| NVD | redhat | enterprise_linux_workstationcpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:* |
= 6.0 | |
| NVD | redhat | enterprise_linux_workstationcpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:* |
= 7.0 |
References
- http://packetstormsecurity.com/files/154124/GNU-patch-Command-Injection-Directory-Traversal.html
- http://rachelbythebay.com/w/2018/04/05/bangpatch/ · Third Party Advisory
- https://access.redhat.com/errata/RHSA-2018:1199 · Third Party Advisory
- https://access.redhat.com/errata/RHSA-2018:1200 · Third Party Advisory
- https://access.redhat.com/errata/RHSA-2018:2091 · Third Party Advisory
- https://access.redhat.com/errata/RHSA-2018:2092 · Third Party Advisory
- https://access.redhat.com/errata/RHSA-2018:2093 · Third Party Advisory
- https://access.redhat.com/errata/RHSA-2018:2094 · Third Party Advisory
- https://access.redhat.com/errata/RHSA-2018:2095 · Third Party Advisory
- https://access.redhat.com/errata/RHSA-2018:2096 · Third Party Advisory
- https://access.redhat.com/errata/RHSA-2018:2097 · Third Party Advisory
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894667#19 · Issue Tracking, Third Party Advisory
- https://lists.debian.org/debian-lts-announce/2018/04/msg00013.html · Mailing List, Third Party Advisory
- https://savannah.gnu.org/bugs/index.php?53566 · Vendor Advisory
- https://seclists.org/bugtraq/2019/Aug/29
- https://seclists.org/bugtraq/2019/Jul/54
- https://security.gentoo.org/glsa/201904-17 · Third Party Advisory
- https://usn.ubuntu.com/3624-1/ · Third Party Advisory
- https://usn.ubuntu.com/3624-2/ · Third Party Advisory
- https://web.archive.org/web/20180405231329/https://twitter.com/kurtseifried/status/982028968877436928
- https://twitter.com/kurtseifried/status/982028968877436928 · Third Party Advisory
History
- 25 Nov 2026 20:20 UTC · NVD: first stored (published 6 Apr 2018)