Skip to main content

Vim EUVDEUVD-2026-36282

| CVE-2026-52858 HIGH
Code Injection (CWE-94)
2026-06-11 GitHub_M
7.3
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Recon
    Stage malicious .py with sibling package
  2. Delivery
    Victim clones/downloads repo
  3. Exploit
    Victim opens file in Vim
  4. Install
    Victim triggers omni-completion (Ctrl-X Ctrl-O)
  5. C2
    Completer re-executes buffer import statements
  6. Execute
    Python imports sibling package, runs top-level code
  7. Impact
    Arbitrary code executes as editing user

Vulnerability Assessment

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

2 techniques across 2 tactics: Execution, Initial Access

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

Exploitation Conditions

The target Vim build must be compiled with +python3 (or legacy +python), and the user must have Python omni-completion configured for Python files (typically 'set omnifunc=python3complete#Complete', which many Python plugin bundles and distro defaults enable). The victim must open an attacker-controlled .py file whose buffer directory contains a malicious sibling Python package or module, and must then invoke omni-completion (Ctrl-X Ctrl-O or equivalent) on that buffer. Limiting factors: requires explicit user interaction (opening the file and triggering completion - exploitation does not occur on mere file open), Vim version below 9.2.0561, Python interpreter linked into the Vim build, and an attacker-influenced working directory; on patched Vim, exploitation additionally requires the user to have manually set g:pythoncomplete_allow_import=1.

Impact

Real-world risk is moderate and skewed toward developer/CI workstations rather than servers. The CVSS 4.0 vector AV:N/AC:L/AT:P/PR:L/UI:A reflects that the network vector is only the file delivery channel (e.g., cloning a hostile repo) and exploitation requires the victim to actively open the .py file and trigger omni-completion (UI:A, AT:P) while already having local Vim session privileges (PR:L). There is no EPSS score, no KEV listing, and no POC in the provided intelligence, so this is best treated as a credible but not actively exploited supply-chain-style threat against developers who routinely browse untrusted Python repositories in Vim. The high VC/VI/VA impact is justified - arbitrary Python runs as the user, so SSH keys, source trees and tokens are all reachable. Note that the assessed CVSS 4.0 vector lists PR:L while the description implies no prior Vim authentication is needed beyond local user session; PR:L here appears to encode 'attacker-supplied file needs to land where the user opens it,' which is debatable - defenders should not assume strict pre-auth requirements. Risk is highest for anyone reviewing untrusted Python projects (security researchers, code-review platforms, CTF participants).

Exploit ScenarioDerived

An attacker publishes a Python repository (e.g., on GitHub, PyPI source tarball, or a CTF challenge bundle) containing a benign-looking script demo.py with 'import helpers' at the top, plus a sibling helpers/__init__.py whose top-level code spawns a reverse shell or exfiltrates ~/.ssh/id_rsa. A developer clones the repo, opens demo.py in Vim, and types <C-x><C-o> while the cursor is near 'helpers.' to autocomplete; python3complete.vim re-executes the import line, Python loads helpers/__init__.py from the buffer's directory, and the payload runs as the developer. No public exploit is identified at time of analysis, but the patch comments and advisory describe the trigger path in enough detail for a working POC to be constructed quickly.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.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 – Jun 11, 2026

Arbitrary code execution in Vim prior to 9.2.0561 occurs when a user opens a malicious Python file and triggers Python omni-completion (python3complete.vim or pythoncomplete.vim), causing Vim's completion script to execute import/from statements from the buffer through Python's import machinery and run attacker-controlled package code as the editing user. Affects any Vim build with +python3 or +python interpreter support; no public exploit identified at time of analysis, but the upstream patch and detailed advisory (GHSA-52mc-rq6p-rc7c) make the issue well-documented. The CVSS 4.0 score of 7.3 reflects required user interaction (opening the file and invoking completion) but high impact on confidentiality, integrity, and availability of the user's account.

RemediationAI

Vendor-released patch: Vim 9.2.0561 - upgrade to this version or later from https://github.com/vim/vim/releases/tag/v9.2.0561, which applies commit 4b850457e12e1a678dd209f2868154f7553cbf8d to make the completion script ignore import/from statements unless the user explicitly opts in via 'let g:pythoncomplete_allow_import = 1'. As workarounds on unpatched systems, either disable Python omni-completion for Python files ('autocmd FileType python setlocal omnifunc=' in vimrc, at the cost of losing module-member completion), avoid invoking <C-x><C-o> on Python files from untrusted sources, or open such files from a directory that does not contain attacker-controlled sibling packages (e.g., copy the single file out to /tmp before editing) - note that simply changing cwd before opening Vim is not reliable because the buffer's directory is what ends up on sys.path. Do not enable g:pythoncomplete_allow_import on patched Vim unless you fully trust every Python file you will edit.

Affected VersionsENISA

vim < 9.2.0561

Affected Packages

euvd vim fix: 9.2.0561

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

Vim's Python omni-completion feature (runtime/autoload/python3complete.vim and the legacy pythoncomplete.vim) is implemented in Python and runs inside Vim's embedded interpreter when the user requests completion. To resolve names of members on imported modules, the Completer class scraped the buffer for lines starting with 'import' or 'from ' and fed them back through Python's real import system. Because Python's current working directory (the buffer's directory) is on sys.path, any sibling package or module in that directory was importable, and Python executes the top-level code of any module it imports. This is a classic CWE-94 (Improper Control of Generation of Code / Code Injection) pattern: untrusted text from a data file is promoted into executable code without an opt-in. The CPE cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:* confirms the issue is in upstream Vim itself, not a distro patch, and applies to any build compiled with +python3 (or the legacy +python) where the user has Python omni-completion enabled (commonly via 'set omnifunc=python3complete#Complete' for *.py files).

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 7.3 HIGH
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.8 HIGH

Exploitation requires opening a local file and manually invoking omni-completion (AV:L, UI:R); no prior Vim auth needed (PR:N); resulting Python runs as user with full C/I/A impact.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Red Hat 7.3 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

1
Patch available
Jun 11, 2026 - 20:01 EUVD

DescriptionCVE.org

Vim is an open source, command line text editor. Prior to version 9.2.0561, the Python omni-completion script in python3complete.vim for Vim with the +python3 interpreter enabled (and the legacy pythoncomplete.vim for builds with the +python interpreter) executes the import and from statements found in the current buffer through Python's import machinery. Because the buffer's working directory is on sys.path, opening a hostile .py file with a sibling Python package and invoking omni-completion runs that package's top-level code as the editing user. This issue has been patched in version 9.2.0561.

Executive ViewAI

Why It Matters

Vim with Python support contains an arbitrary code execution vulnerability triggered when users open malicious Python files and invoke auto-completion features. Attackers can execute code with the editing user's privileges, potentially compromising developer systems, credentials, and intellectual property. This affects all organizations where developers use Vim for Python development.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 86% exploitable
Data Quality
7 sources
Confidence: High
EUVD 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 HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

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

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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: Important
Product Status
SLES15-SP5-CHOST-BYOS-SAP-CCloud Affected
SLES15-SP6-CHOST-BYOS Affected
SLES15-SP6-CHOST-BYOS-Aliyun Affected
SLES15-SP6-CHOST-BYOS-Azure Affected
SLES15-SP6-CHOST-BYOS-EC2 Affected

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