OS Command Injection in Vim - CVE-2019-12735

 

OS Command Injection in Vim - CVE-2019-12735

Published: June 5, 2019 / Updated: June 17, 2021


Vulnerability identifier: #VU31049
CSH Severity: Low
CVSS v4: 8.4 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2019-12735
CWE-ID: CWE-78
Exploitation vector: Local access
Exploit availability: Public exploit is available

Vulnerability details

The vulnerability allows a local non-authenticated attacker to execute arbitrary code.

getchar.c in Vim before 8.1.1365 and Neovim before 0.3.6 allows remote attackers to execute arbitrary OS commands via the :source! command in a modeline, as demonstrated by execute in Vim, and assert_fails or nvim_input in Neovim.


Affected software

Vim
Gentoo Linux
Amazon Linux AMI
Arch Linux
Red Hat Enterprise Linux for Scientific Computing
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 Power, big endian
Red Hat Enterprise Linux for IBM System z (Structure A)
Red Hat Enterprise Linux for Power 9
Red Hat Enterprise Linux for ARM 64
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux Server - TUS
Red Hat Enterprise Linux for Power, big endian - Extended Update Support
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux Server - Extended Update Support
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Red Hat Enterprise Linux Server - AUS
Red Hat Enterprise Linux EUS Compute Node
Red Hat Virtualization Host - Extended Update Support 4.2 for RHEL
Red Hat Enterprise Linux for x86_64
SUSE Linux
Opensuse
Fedora
neovim (Alpine package)
vim (Red Hat package)
vim
Red Hat Virtualization Host
Data Computing Appliance (DCA)
Dell PowerProtect Cyber Recovery
Dell EMC Unity Operating Environment (OE)
Dell EMC Unity VSA Operating Environment (OE)
Session Smart Router

How to mitigate CVE-2019-12735

Install update from vendor's website.

Vim - update to 8.1.1365
neovim (Alpine package) - update to 0.3.8-r0
Data Computing Appliance (DCA) - update to 3.5.4.0
Dell EMC Unity Operating Environment (OE) - update to 5.0.3.0.5.014
Dell EMC Unity VSA Operating Environment (OE) - update to 5.0.3.0.5.014
Session Smart Router - addressed in versions 5.4.7, 5.5.3
vim (Red Hat package) - addressed in versions 7.4.160-2.el7_4.1, 7.4.160-4.el7_5.1, 7.4.160-6.el7_6, 7.4.629-5.el6_10.2, 8.0.1763-11.el8_0
vim - addressed in versions 8.1.1471-1.fc29, 8.1.1471-1.fc30
Dell PowerProtect Cyber Recovery - update to 18.1.1.2-8

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins