CVE-2018-20969
do_ed_script in pch.c in GNU patch through 2.7.6 does not block strings beginning with a !...
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.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
7.8
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.
- Record
CVE-2018-20969- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 2.0
- 9.3 High
AV:N/AC:M/Au:N/C:C/I:C/A:C - Weakness
- CWE-78
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2018-20969- Updated
- 2026-11-02
EUVDEUVD-2018-13506 No score
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.
- Record
EUVD-2018-13506- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-g5pm-269j-95rr
7.8
do_ed_script in pch.c in GNU patch through 2.7.6 does not block strings beginning with a !...
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.
- Record
GHSA-g5pm-269j-95rr- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVALPINE-CVE-2018-20969
7.8
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.
- Record
ALPINE-CVE-2018-20969- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVAZL-35102
7.8
CVE-2018-20969 affecting package patch for versions less than 2.7.6-9
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.
- Record
AZL-35102- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-05
Show 12 moreShow less
OSVAZL-6786
7.8
CVE-2018-20969 affecting package patch for versions less than 2.7.6-7
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.
- Record
AZL-6786- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVBELL-CVE-2018-20969
7.8
CVE-2018-20969 does not affect BellSoft software
- Record
BELL-CVE-2018-20969- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSV
7.8
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.
- Record
CVE-2018-20969- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2018-20969
7.8
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.
- Record
DEBIAN-CVE-2018-20969- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVJLSEC-2026-13
7.8
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.
- Record
JLSEC-2026-13- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 2.0
- 9.3 Critical
AV:N/AC:M/Au:N/C:C/I:C/A:C - Updated
- 2026-11-02
OSVRHSA-2019:2798
7.8
Red Hat Security Advisory: patch security update
- Record
RHSA-2019:2798- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2019:2964
7.8
Red Hat Security Advisory: patch security update
- Record
RHSA-2019:2964- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2019:3757
7.8
Red Hat Security Advisory: patch security update
- Record
RHSA-2019:3757- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2019:3758
7.8
Red Hat Security Advisory: patch security update
- Record
RHSA-2019:3758- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2019:4061
7.8
Red Hat Security Advisory: patch security update
- Record
RHSA-2019:4061- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2018-20969
7.8
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.
- Record
UBUNTU-CVE-2018-20969- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVMGASA-2020-0093 No score
Updated patch packages fix security vulnerabilities
Updated patch package fixes security vulnerabilities:
-
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. (CVE-2019-13636).
-
A vulnerability was found in 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 (CVE-2019-13638).
-
A vulnerability was found in 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 (CVE-2018-20969).
- Record
MGASA-2020-0093- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
patchAlpine:v3.10 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.11 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.12 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.13 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.14 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.15 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.16 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.17 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.18 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.19 |
before 2.7.6-r6 | 2.7.6-r6 |
Show 44 moreShow less
| Package | Affected | Fixed |
|---|---|---|
patchAlpine:v3.20 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.21 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.22 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.23 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.24 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.9 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAzure Linux:3 |
before 2.7.6-9 | 2.7.6-9 |
patchAzure Linux:2 |
before 2.7.6-7 | 2.7.6-7 |
patchDebian:12 |
before 2.7.6-5 | 2.7.6-5 |
patchDebian:13 |
before 2.7.6-5 | 2.7.6-5 |
patchDebian:14 |
before 2.7.6-5 | 2.7.6-5 |
patchDebian:8 From an advisory covering 2 CVEs |
before 2.7.5-1+deb8u3, plus listed versions 2.7.5-12.7.5-1+deb8u12.7.5-1+deb8u2 |
2.7.5-1+deb8u3 |
patchDebian:9 From an advisory covering 3 CVEs |
before 2.7.5-1+deb9u2, plus listed versions 2.7.5-12.7.5-1+deb9u1 |
2.7.5-1+deb9u2 |
patchDebian:10 From an advisory covering 3 CVEs |
before 2.7.6-3+deb10u1, plus listed versions 2.7.6-3 |
2.7.6-3+deb10u1 |
patch_jllJulia |
before 2.8.0+0 | 2.8.0+0 |
patchMageia:7 From an advisory covering 3 CVEs |
before 2.7.6-4.1.mga7 | 2.7.6-4.1.mga7 |
patchRed Hat:enterprise_linux:8::baseos From an advisory covering 2 CVEs |
before 0:2.7.6-9.el8_0 | 0:2.7.6-9.el8_0 |
patch-debuginfoRed Hat:enterprise_linux:8::baseos From an advisory covering 2 CVEs |
before 0:2.7.6-9.el8_0 | 0:2.7.6-9.el8_0 |
patch-debugsourceRed Hat:enterprise_linux:8::baseos From an advisory covering 2 CVEs |
before 0:2.7.6-9.el8_0 | 0:2.7.6-9.el8_0 |
patchRed Hat:enterprise_linux:7::client From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patch-debuginfoRed Hat:enterprise_linux:7::client From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patchRed Hat:enterprise_linux:7::computenode From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patch-debuginfoRed Hat:enterprise_linux:7::computenode From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patchRed Hat:enterprise_linux:7::server From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patch-debuginfoRed Hat:enterprise_linux:7::server From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patchRed Hat:enterprise_linux:7::workstation From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patch-debuginfoRed Hat:enterprise_linux:7::workstation From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patchRed Hat:rhel_eus:7.5::computenode From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_5 | 0:2.7.1-11.el7_5 |
patch-debuginfoRed Hat:rhel_eus:7.5::computenode From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_5 | 0:2.7.1-11.el7_5 |
patchRed Hat:rhel_eus:7.5::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_5 | 0:2.7.1-11.el7_5 |
patch-debuginfoRed Hat:rhel_eus:7.5::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_5 | 0:2.7.1-11.el7_5 |
patchRed Hat:rhel_eus:7.6::computenode From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_6 | 0:2.7.1-11.el7_6 |
patch-debuginfoRed Hat:rhel_eus:7.6::computenode From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_6 | 0:2.7.1-11.el7_6 |
patchRed Hat:rhel_eus:7.6::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_6 | 0:2.7.1-11.el7_6 |
patch-debuginfoRed Hat:rhel_eus:7.6::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_6 | 0:2.7.1-11.el7_6 |
patchRed Hat:rhel_aus:7.4::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_4 | 0:2.7.1-11.el7_4 |
patch-debuginfoRed Hat:rhel_aus:7.4::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_4 | 0:2.7.1-11.el7_4 |
patchRed Hat:rhel_e4s:7.4::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_4 | 0:2.7.1-11.el7_4 |
patch-debuginfoRed Hat:rhel_e4s:7.4::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_4 | 0:2.7.1-11.el7_4 |
patchRed Hat:rhel_tus:7.4::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_4 | 0:2.7.1-11.el7_4 |
patch-debuginfoRed Hat:rhel_tus:7.4::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_4 | 0:2.7.1-11.el7_4 |
patchUbuntu:Pro:14.04:LTS |
before 2.7.1-4ubuntu2.4+esm1, plus listed versions 2.7.1-32.7.1-42.7.1-4ubuntu12.7.1-4ubuntu22.7.1-4ubuntu2.32.7.1-4ubuntu2.4 |
2.7.1-4ubuntu2.4+esm1 |
patchUbuntu:16.04:LTS |
before 2.7.5-1ubuntu0.16.04.2, plus listed versions 2.7.5-12.7.5-1ubuntu0.16.04.1 |
2.7.5-1ubuntu0.16.04.2 |
patchUbuntu:18.04:LTS |
before 2.7.6-2ubuntu1.1, plus listed versions 2.7.5-1build12.7.6-12.7.6-2ubuntu1 |
2.7.6-2ubuntu1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| facts | OSV | |
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2018-20969 is a high vulnerability (CVSS 7.8) in Gnu Patch, published July 25, 2019. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.68%, the 85th percentile. Fixed in patch 2.7.6-r6.
References
git.savannah.gnu.org/cgit/patch.git/commit?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0
seclists.org/bugtraq/2019/Aug/29
packetstormsecurity.com/files/154124/GNU-patch-Command-Injection-Directory-Traversal.html
github.com/irsl/gnu-patch-vulnerabilities
access.redhat.com/errata/RHSA-2019:2798
access.redhat.com/errata/RHSA-2019:2964
Show 27 moreShow less
access.redhat.com/errata/RHSA-2019:3757
access.redhat.com/errata/RHSA-2019:3758
access.redhat.com/errata/RHSA-2019:4061
nvd.nist.gov/vuln/detail/CVE-2018-20969
github.com/advisories/GHSA-g5pm-269j-95rr
security.alpinelinux.org/vuln/CVE-2018-20969
docs.bell-sw.com/security/cves/CVE-2018-20969
security-tracker.debian.org/tracker/CVE-2018-20969
advisories.mageia.org/MGASA-2020-0093.html
bugs.mageia.org/show_bug.cgi?id=25279
lists.fedoraproject.org/archives/list/[email protected]/thread/SVWWGISFWACROJJPVJJL4UBLVZ7LPOLT
access.redhat.com/security/updates/classification
bugzilla.redhat.com/show_bug.cgi?id=1733916
bugzilla.redhat.com/show_bug.cgi?id=1746672
security.access.redhat.com/data/csaf/v2/advisories/2019/rhsa-2019_2798.json
access.redhat.com/security/cve/CVE-2018-20969
cve.org/CVERecord?id=CVE-2018-20969
access.redhat.com/security/cve/CVE-2019-13638
cve.org/CVERecord?id=CVE-2019-13638
nvd.nist.gov/vuln/detail/CVE-2019-13638
security.access.redhat.com/data/csaf/v2/advisories/2019/rhsa-2019_2964.json
security.access.redhat.com/data/csaf/v2/advisories/2019/rhsa-2019_3757.json
security.access.redhat.com/data/csaf/v2/advisories/2019/rhsa-2019_3758.json
security.access.redhat.com/data/csaf/v2/advisories/2019/rhsa-2019_4061.json
ubuntu.com/security/CVE-2018-20969
ubuntu.com/security/notices/USN-4071-1
ubuntu.com/security/notices/USN-4071-2