cve.bz

CVE-2019-12735 OS Command Injection

8.6 highExploitEPSS 19%Fix available

High (8.6). EPSS 19% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.0

8.6 high
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
EPSS
19% (unchanged from 19% a week ago; 19% 30 days ago) estimated probability of exploitation activity in the next 30 days; 97th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-78 Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2019-12735 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2019-12735?via=ask-ai-copy and https://cve.bz/cve/CVE-2019-12735?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2019-12735 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
vim:vimbefore 8.1.1365
neovim:neovimbefore 0.3.6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian8vim2:7.4.488-7+deb8u4DLA-1871-1
Debian9neovim0.1.7-4+deb9u1DSA-4487-1
Debian9vim2:8.0.0197-4+deb9u2DSA-4467-1
Debian12, 13, 14neovim0.3.4-3DEBIAN-CVE-2019-12735
Debian12, 13, 14vim2:8.1.0875-4DEBIAN-CVE-2019-12735
Ubuntu16.04:LTSvim2:7.4.1689-3ubuntu1.3UBUNTU-CVE-2019-12735 USN-4016-1
Ubuntu18.04:LTSvim2:8.0.1453-1ubuntu1.1UBUNTU-CVE-2019-12735 USN-4016-1
UbuntuPro:18.04:LTSneovim0.2.2-3ubuntu0.1~esm1UBUNTU-CVE-2019-12735 USN-4862-1
Red Hatenterprise_linux:6::client, enterprise_linux:6::computenode, enterprise_linux:6::server and 1 morevim, vim-X11, vim-common and 4 more2:7.4.629-5.el6_10.2RHSA-2019:1774
Red Hatenterprise_linux:7::client, enterprise_linux:7::computenode, enterprise_linux:7::server and 1 morevim, vim-X11, vim-common and 4 more2:7.4.160-6.el7_6RHSA-2019:1619
Red Hatenterprise_linux:8::appstreamvim-X11, vim-common, vim-enhanced and 7 more2:8.0.1763-11.el8_0RHSA-2019:1619
Red Hatenterprise_linux:8::baseosvim, vim-minimal, vim-debuginfo and 5 more2:8.0.1763-11.el8_0RHSA-2019:1619
Red Hatrhel_eus:7.4::computenode, rhel_eus:7.4::servervim, vim-X11, vim-common and 4 more2:7.4.160-2.el7_4.1RHSA-2019:1947
Red Hatrhel_eus:7.5::computenode, rhel_eus:7.5::servervim, vim-X11, vim-common and 4 more2:7.4.160-4.el7_5.1RHSA-2019:1793
SUSEEnterprise Storage 4, Linux Enterprise Desktop 12 SP3, Linux Enterprise Desktop 12 SP4 and 11 morevim7.4.326-17.3.1SUSE-SU-2019:1456-1
SUSELinux Enterprise Module for Basesystem 15, Linux Enterprise Module for Basesystem 15 SP1, Linux Enterprise Module for Desktop Applications 15 and 1 morevim8.0.1568-5.3.1SUSE-SU-2019:1457-1
SUSELinux Enterprise Point of Sale 11 SP3, Linux Enterprise Server 11 SP4-LTSSvim7.2-8.21.3.1SUSE-SU-2019:14078-1
SUSEPackage Hub 15neovim0.3.1-bp150.2.6.1openSUSE-SU-2019:1551-1
SUSEPackage Hub 15neovim0.3.7-bp150.2.9.1openSUSE-SU-2019:1796-1
SUSEPackage Hub 15 SP1neovim0.3.7-bp151.3.3.1openSUSE-SU-2019:1997-1
openSUSELeap 15.0, Leap 15.1neovim0.3.1-bp150.2.6.1openSUSE-SU-2019:1551-1
openSUSELeap 15.0, Leap 15.1neovim0.3.7-lp151.2.7.1openSUSE-SU-2019:1759-1
openSUSELeap 15.0, Leap 15.1vim8.0.1568-lp151.5.3.1openSUSE-SU-2019:1561-1
openSUSETumbleweedneovim0.5.1-1.1openSUSE-SU-2024:11081-1
openSUSETumbleweedvim8.2.3408-1.2openSUSE-SU-2024:11497-1
Alpinev3.7vim8.0.1359-r2ALPINE-CVE-2019-12735
Alpinev3.8vim8.1.1365ALPINE-CVE-2019-12735
Alpinev3.9, v3.10, v3.11 and 13 morevim8.1.1365-r0ALPINE-CVE-2019-12735
Alpinev3.10, v3.11, v3.12 and 12 moreneovim0.3.6-r0ALPINE-CVE-2019-12735

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

To be successfully and automatically triggered when a specially crafted file is opened, this vulnerability requires 3 parts :

1) The `source!` command inability to check if it is running in sandbox mode (the fix commit prevents this)

2) The `modeline` to be enabled (by default, modeline is disabled when running with root permission. See `Mitigation` steps to disable the modeline)

3) A function, to be inserted in the modeline, that can be used to trigger the `source!` command (e.g.: `assert_fail()` in the public reproducer). To the best of our knowledge, no such functions were found in the default installation of Red Hat Enterprise Linux versions 5, 6 and 7 at the time of the flaw. However, Red Hat Enterprise Linux version 8 contains `assert_fail()`.

Without part 2 or 3, it would be required for an attacker to be able to craft the command line used to open the crafted file, in order to trigger the vulnerability.

Red Hat's mitigation

The vulnerability can be triggered only if `modeline` is enabled. You can check whether `modeline` is enabled within vim via the command `:set modeline?`

It can be turned off explicitly by adding `set nomodeline` in a vimrc file.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6vim-2:7.4.629-5.el6_10.2Fixed 2019-07-15RHSA-2019:1774
Red Hat Enterprise Linux 7vim-2:7.4.160-6.el7_6Fixed 2019-06-27RHSA-2019:1619
Red Hat Enterprise Linux 7.4 Extended Update Supportvim-2:7.4.160-2.el7_4.1Fixed 2019-07-30RHSA-2019:1947
Red Hat Enterprise Linux 7.5 Extended Update Supportvim-2:7.4.160-4.el7_5.1Fixed 2019-07-16RHSA-2019:1793
Red Hat Enterprise Linux 8vim-2:8.0.1763-11.el8_0Fixed 2019-06-27RHSA-2019:1619
Red Hat Enterprise Linux 5vimOut of support scope

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2019-12735.

Public exploits

Attack patterns (CAPEC)

  • CAPEC-6 Argument Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON