All reports
High

patch: do_ed_script in pch.c does not block strings beginning with a ! character

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2018-20969

Probability of exploitation in the next 30 days: 2.68%

FIRST EPSS · 2026-11-19

Description

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.