OS Command Injection in GNU patch - CVE-2018-20969
Published: August 27, 2019
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary shell commands on the target system.
The vulnerability exists due to the "do_ed_script" function in the "pch.c" file does not block strings beginning with a ! character. A remote unauthenticated attacker can trick a victim to open a specially crafted patch file and execute arbitrary OS shell commands on the target system.
Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.
Affected software
patch (Alpine package)
patch (Red Hat package)
Amazon Linux AMI
Red Hat Enterprise Linux Server
Red Hat Enterprise Linux Workstation
Red Hat Enterprise Linux Desktop
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for Scientific Computing
Red Hat Enterprise Linux for Power
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux EUS Compute Node
Red Hat Enterprise Linux for x86_64 - Extended Update Support
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux for Power, big endian - Extended Update Support
Red Hat Enterprise Linux Server - AUS
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Red Hat Enterprise Linux Server - TUS
How to mitigate CVE-2018-20969
patch (Alpine package) - update to 2.7.6-r6