All reports
High

patch: OS shell command injection when processing crafted patch files

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2019-13638

Probability of exploitation in the next 30 days: 4.49%

FIRST EPSS · 2026-11-22

Description

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. The ed editor does not need to be present on the vulnerable system. This is different from CVE-2018-1000156.

A flaw was found in GNU patch through version 2.7.6. An ed-style diff payload patch file with shell metacharacters can be used to inject OS shell commands into a system. The ed editor does not need to be present on the vulnerable system for this attack to function. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.