Every CVE Search/ Get API key

CVE-2018-20969

do_ed_script in pch.c in GNU patch through 2.7.6 does not block strings beginning with a !...

7.8 HighFix available

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

2.68%Up 0.6 points since Apr 14, 2021
90%50%10%1%

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 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.0
9.3 HighAV: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.0
9.3 CriticalAV: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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

Affected packages
PackageAffectedFixed
patch
Alpine:v3.10
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.11
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.12
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.13
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.14
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.15
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.16
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.17
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.18
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.19
before 2.7.6-r6
2.7.6-r6
Show 44 moreShow less
Affected packages
PackageAffectedFixed
patch
Alpine:v3.20
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.21
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.22
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.23
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.24
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.9
before 2.7.6-r6
2.7.6-r6
patch
Azure Linux:3
before 2.7.6-9
2.7.6-9
patch
Azure Linux:2
before 2.7.6-7
2.7.6-7
patch
Debian:12
before 2.7.6-5
2.7.6-5
patch
Debian:13
before 2.7.6-5
2.7.6-5
patch
Debian:14
before 2.7.6-5
2.7.6-5
patch
Debian: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
patch
Debian: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
patch
Debian: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_jll
Julia
before 2.8.0+0
2.8.0+0
patch
Mageia:7
From an advisory covering 3 CVEs
before 2.7.6-4.1.mga7
2.7.6-4.1.mga7
patch
Red 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-debuginfo
Red 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-debugsource
Red 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
Red 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-debuginfo
Red 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
Red 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-debuginfo
Red 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
Red 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-debuginfo
Red 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
Red 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-debuginfo
Red 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
Red 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-debuginfo
Red 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
Red 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-debuginfo
Red 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
Red 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-debuginfo
Red 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
Red 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-debuginfo
Red 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
Red 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-debuginfo
Red 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
Red 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-debuginfo
Red 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
Red 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-debuginfo
Red 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
Ubuntu: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
patch
Ubuntu: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
patch
Ubuntu: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

History
RecordedChangedSources
affected
factsOSV
aliasesEUVD
first indexedCVE 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

Show 27 moreShow less
MoveEnter Open