CVE-2018-20969
published 2019-08-16CVE-2018-20969: 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…
PriorityP336high7.8CVSS 3.0
AVLACLPRNUIRSUCHIHAH
EPSS
2.71%
84.3th percentile
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.
Affected
23 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | patch | < patch 2.7.6-5 (bookworm) | patch 2.7.6-5 (bookworm) |
| gnu | patch | <= 2.7.6 | — |
| gnu | patch | >= 0 < 2.7.6-5 | 2.7.6-5 |
| gnu | patch | >= 0 < 2.7.6-5 | 2.7.6-5 |
| gnu | patch | >= 0 < 2.7.6-5 | 2.7.6-5 |
| gnu | patch | >= 0 < 2.7.6-5 | 2.7.6-5 |
| msrc | azl3_patch_2.7.6-9_on_azure_linux_3.0 | — | — |
| msrc | cbl2_patch_2.7.6-7_on_cbl_mariner_2.0 | — | — |
| msrc | cbl_mariner_1.0_arm | — | — |
| msrc | cbl_mariner_1.0_x64 | — | — |
| msrc | cbl_mariner_2.0_arm | — | — |
| msrc | cbl_mariner_2.0_x64 | — | — |
| msrc | cm1_patch_2.7.6-7_on_cbl_mariner_1.0 | — | — |
| msrc | patch-2.7.6-7.cm1.aarch64.rpm_on_cbl_mariner_1.0_arm | — | — |
| msrc | patch-2.7.6-7.cm1.x86_64.rpm_on_cbl_mariner_1.0_x64 | — | — |
| msrc | patch-2.7.6-7.cm2.aarch64.rpm_on_cbl_mariner_2.0_arm | — | — |
| msrc | patch-2.7.6-7.cm2.x86_64.rpm_on_cbl_mariner_2.0_x64 | — | — |
| msrc | patch-2.7.6-9.azl3.aarch64.rpm_on_azure_linux_3.0_arm | — | — |
| msrc | patch-2.7.6-9.azl3.x86_64.rpm_on_azure_linux_3.0_x64 | — | — |
| msrc | patch-debuginfo-2.7.6-7.cm1.aarch64.rpm_on_cbl_mariner_1.0_arm | — | — |
| msrc | patch-debuginfo-2.7.6-7.cm1.x86_64.rpm_on_cbl_mariner_1.0_x64 | — | — |
| msrc | patch-debuginfo-2.7.6-7.cm2.aarch64.rpm_on_cbl_mariner_2.0_arm | — | — |
| msrc | patch-debuginfo-2.7.6-7.cm2.x86_64.rpm_on_cbl_mariner_2.0_x64 | — | — |
CVSS provenance
nvdv3.07.8HIGHCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
nvdv2.09.3CRITICALAV:N/AC:M/Au:N/C:C/I:C/A:C
osv7.8HIGH
vendor_debian7.8HIGH
vendor_msrc7.8HIGH
vendor_redhat7.8HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
GHSA-g5pm-269j-95rr: do_ed_script in pch
ghsa_unreviewed·2022-05-24·CVSS 7.8
CVE-2018-20969 [HIGH] CWE-78 GHSA-g5pm-269j-95rr: do_ed_script in pch
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.
OSV
CVE-2018-20969: do_ed_script in pch
osv·2019-08-16·CVSS 7.8
CVE-2018-20969 [HIGH] CVE-2018-20969: do_ed_script in pch
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.
Red Hat
patch: do_ed_script in pch.c does not block strings beginning with a ! character
vendor_redhat·2019-08-16·CVSS 7.8
CVE-2018-20969 [HIGH] CWE-78 patch: do_ed_script in pch.c does not block strings beginning with a ! character
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.
A flaw was found in GNU patch through version 2.7.6. Strings beginning with a exclamation mark are not blocked by default. When ed receives an exclamation mark-prefixed command line argument, the argument is executed as a shell command. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.
Package: patch (Red Hat Enterprise Linux 5) - Out of support scope
Package: patch (Red Hat Enterprise Linux 6) - Not affected
Microsoft
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 unre
vendor_msrc·2019-08-13·CVSS 7.8
CVE-2018-20969 [HIGH] CWE-78 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 unre
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.
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is
Debian
CVE-2018-20969: patch - do_ed_script in pch.c in GNU patch through 2.7.6 does not block strings beginnin...
vendor_debian·2018·CVSS 7.8
CVE-2018-20969 [HIGH] CVE-2018-20969: patch - do_ed_script in pch.c in GNU patch through 2.7.6 does not block strings beginnin...
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.
Scope: local
bookworm: resolved (fixed in 2.7.6-5)
bullseye: resolved (fixed in 2.7.6-5)
forky: resolved (fixed in 2.7.6-5)
sid: resolved (fixed in 2.7.6-5)
trixie: resolved (fixed in 2.7.6-5)
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2018-20969 patch: do_ed_script in pch.c does not block strings beginning with a ! character [fedora-all]
bugzilla·2019-08-29·CVSS 7.8
CVE-2018-20969 [HIGH] CVE-2018-20969 patch: do_ed_script in pch.c does not block strings beginning with a ! character [fedora-all]
CVE-2018-20969 patch: do_ed_script in pch.c does not block strings beginning with a ! character [fedora-all]
This is an automatically created tracking bug! It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of fedora-all.
For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.
For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs
When submitting as an update, use the fedpkg template provided in the next
comment(s). This will include the bug IDs of this tracking bug as well as
the relevant top-level CVE bugs.
Please also mention the CVE IDs being fixed in the RPM changelog and the
fedpkg commit message.
NOTE: this issue affe
Bugzilla
CVE-2018-20969 patch: do_ed_script in pch.c does not block strings beginning with a ! character
bugzilla·2019-08-29·CVSS 7.8
CVE-2018-20969 [HIGH] CVE-2018-20969 patch: do_ed_script in pch.c does not block strings beginning with a ! character
CVE-2018-20969 patch: do_ed_script in pch.c does not block strings beginning with a ! character
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.
Reference:
https://git.savannah.gnu.org/cgit/patch.git/commit/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0
https://seclists.org/bugtraq/2019/Aug/29
Discussion:
Created patch tracking bugs for this issue:
Affects: fedora-all [bug 1746673]
---
This issue has been addressed in the following products:
Red Hat Enterprise Linux 8
Via RHSA-2019:2798 https://access.redhat.com/errata/RHSA-2019:2798
---
This bug is now closed. Further u
http://packetstormsecurity.com/files/154124/GNU-patch-Command-Injection-Directory-Traversal.htmlhttps://access.redhat.com/errata/RHSA-2019:2798https://access.redhat.com/errata/RHSA-2019:2964https://access.redhat.com/errata/RHSA-2019:3757https://access.redhat.com/errata/RHSA-2019:3758https://access.redhat.com/errata/RHSA-2019:4061https://git.savannah.gnu.org/cgit/patch.git/commit/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0https://github.com/irsl/gnu-patch-vulnerabilitieshttps://seclists.org/bugtraq/2019/Aug/29http://packetstormsecurity.com/files/154124/GNU-patch-Command-Injection-Directory-Traversal.htmlhttps://access.redhat.com/errata/RHSA-2019:2798https://access.redhat.com/errata/RHSA-2019:2964https://access.redhat.com/errata/RHSA-2019:3757https://access.redhat.com/errata/RHSA-2019:3758https://access.redhat.com/errata/RHSA-2019:4061https://git.savannah.gnu.org/cgit/patch.git/commit/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0https://github.com/irsl/gnu-patch-vulnerabilitieshttps://seclists.org/bugtraq/2019/Aug/29
2019-08-16
Published