CVE-2019-12735: OS Command Injection

Published Jun 5, 2019
·
Updated

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 assertfails or nviminput in Neovim.

Other sources

Vim before 8.1.1365 and Neovim before 0.3.6 did not restrict the :source! command when executed in a sandbox. This allows remote attackers to take advantage of the modeline feature to inject arbitrary commands when a specially crafted file is opened.

References: https://github.com/numirias/security/blob/master/doc/2019-06-04ace-vim-neovim.md

Upstream commits: vim: https://github.com/vim/vim/commit/53575521406739cf20bbe4e384d88e7dca11f040 neovim: https://github.com/neovim/neovim/pull/10082/commits/5e611f32841e746932fbcbea292ca502ed9e694b

Red Hat

Affected Software

6 affected componentsFixes available
redhat/vim<8.1.1365
8.1.1365
redhat/neovim<0.3.6
0.3.6
vim Vim<8.1.1365
Neovim Neovim<0.3.6
debian/neovim
0.4.4-10.7.2-70.10.4-80.12.3-40.12.4-1
debian/vim
2:8.2.2434-3+deb11u12:8.2.2434-3+deb11u32:9.0.1378-2+deb12u22:9.1.1230-22:9.2.0524-12:9.2.0782-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/vim to a version that resolves this vulnerability.

    Fixed in 8.1.1365
  2. Upgrade

    Upgrade redhat/neovim to a version that resolves this vulnerability.

    Fixed in 0.3.6
  3. Upgrade

    Upgrade debian/neovim to a version that resolves this vulnerability.

    Fixed in 0.4.4-1Fixed in 0.7.2-7Fixed in 0.10.4-8Fixed in 0.12.3-4Fixed in 0.12.4-1
  4. Upgrade

    Upgrade debian/vim to a version that resolves this vulnerability.

    Fixed in 2:8.2.2434-3+deb11u1Fixed in 2:8.2.2434-3+deb11u3Fixed in 2:9.0.1378-2+deb12u2Fixed in 2:9.1.1230-2Fixed in 2:9.2.0524-1Fixed in 2:9.2.0782-1
  5. Upgrade

    Upgrade vim to a version that resolves this vulnerability.

    Fixed in 8.1.1365
  6. Upgrade

    Upgrade neovim to a version that resolves this vulnerability.

    Fixed in 0.3.6
  7. Compensating control

    If you must open untrusted files, disable or avoid allowing modelines so crafted modelines cannot trigger :source! execution paths.

Event History

Jun 5, 2019
CVE Published
via MITRE·01:07 PM
Data Sourced
via MITRE·01:07 PM
Description
Data Sourced
via NVD·02:29 PM
RemedyDescriptionSeverityWeaknessAffected Software
Nov 26, 2025
Data Sourced
via Ubuntu·05:09 PM
RemedyDescriptionSeverityAffected Software
Feb 19, 2026
Data Sourced
via Launchpad·08:11 PM
Description
Jul 13, 2026
Data Sourced
via Debian·01:59 AM
DescriptionAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2019-12735?

CVE-2019-12735 has a critical severity rating due to its potential to allow remote command execution.

2

How do I fix CVE-2019-12735?

To fix CVE-2019-12735, upgrade Vim to version 8.1.1365 or later, or Neovim to version 0.3.6 or later.

3

Who is affected by CVE-2019-12735?

Users of Vim versions prior to 8.1.1365 and Neovim versions prior to 0.3.6 are affected by CVE-2019-12735.

4

What kind of attacks can exploit CVE-2019-12735?

CVE-2019-12735 allows remote attackers to execute arbitrary operating system commands via the :source! command in a modeline.

5

Is CVE-2019-12735 a known vulnerability?

Yes, CVE-2019-12735 is a known vulnerability that has been publicly disclosed and documented.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203