Skip to main content

Vim CVE-2026-57456

| EUVDEUVD-2026-39436 HIGH
Code Injection (CWE-94)
2026-06-25 GitHub_M
8.4
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Recon
    Craft Python file with malicious docstring
  2. Delivery
    Deliver file to victim (repo/email)
  3. Exploit
    Victim opens buffer in vulnerable Vim
  4. Install
    Victim triggers Python omni-completion (Ctrl-X Ctrl-O)
  5. C2
    Docstring breaks out of triple-quoted literal
  6. Execute
    exec() runs injected Python as user
  7. Impact
    Arbitrary code execution at user privilege

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

Exploitation requires all of the following: a Python-enabled Vim build older than 9.2.0699; the victim opening an attacker-controlled buffer/file; and the victim actively triggering Python omni-completion (omnifunc set to python3complete#Complete or pythoncomplete#Complete, invoked via Ctrl-X Ctrl-O) on that buffer. The malicious input is concrete: a function or class docstring containing a triple-quote sequence (""") that closes the generated literal followed by arbitrary Python, e.g. the test payload 'x"""+open(MARKER,"w").close()+"""y'. Limiting factors that reduce real-world risk: it is a local vector (AV:L) with mandatory user interaction (UI:A) - the attacker cannot trigger it remotely or automatically; it only fires if the user uses Python omni-completion rather than other completion methods; and it requires a Python-capable Vim build. Code runs only at the victim's existing privilege level.

Impact

The provided CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H, base 8.4 High) is internally consistent with the description: exploitation is local and requires victim interaction (UI:A) because the user must open the hostile buffer and explicitly invoke Python omni-completion, but no prior authentication or privileges on the target are needed, and impact to confidentiality, integrity and availability is high since arbitrary Python runs with the user's rights. This is fundamentally a social-engineering / malicious-file vector rather than a remotely automatable one, which materially lowers real-world urgency compared to a network RCE despite the High score. No KEV listing and no public exploit were reported, and no EPSS score was supplied, so there is no signal of active or widespread exploitation; however, the upstream commit ships a working proof-of-concept regression test, so a weaponizable technique is effectively public. Net: a credible, patch-now issue for environments where users routinely open untrusted code and use Python completion, but not an emergency mass-exploitation scenario. Note one nuance to verify: PR:N is correct for the target system, but exploitation still depends on the victim actively triggering completion, so raw score should not be read as 'no conditions.'

Exploit ScenarioDerived

An attacker publishes a Python file (e.g., in a repository, gist, or email attachment) containing a class or function whose docstring is crafted to close the triple-quoted literal and append a payload such as opening a file or spawning a shell. A developer opens the file in a vulnerable Vim build and presses Ctrl-X Ctrl-O to autocomplete a member, at which point Vim's omni-completion reconstructs the definition and exec()s it, running the attacker's Python with the developer's privileges. The bundled regression test (Test_python3complete_no_exec_via_class_docstring) demonstrates exactly this breakout via a class-body docstring, so a proof-of-concept technique is effectively public even though no standalone exploit was reported.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jun 25, 2026

Arbitrary Python code execution in Vim before 9.2.0699 occurs when a victim triggers Python omni-completion (omnifunc) inside a malicious buffer; the python3complete.vim and legacy pythoncomplete.vim runtime plugins reconstruct in-buffer function and class definitions and run them through Python's exec(), inserting each scope's docstring verbatim between triple quotes. Because the docstring is never escaped, a crafted docstring can close the triple-quoted literal and inject attacker-controlled Python that runs with the user's privileges. There is no public exploit identified at time of analysis and the issue is not in CISA KEV, but a regression test bundled with the fix demonstrates the breakout, confirming exploitability; EPSS data was not provided.

RemediationAI

Upgrade to Vim 9.2.0699 or later, which is the vendor-released patch (fixing commit cce141c42740f122dd8486ae04e21c2a81016ba8); see GHSA-ppj8-wqjf-6fp3 (https://github.com/vim/vim/security/advisories/GHSA-ppj8-wqjf-6fp3) and the release at https://github.com/vim/vim/releases/tag/v9.2.0699. If you cannot patch immediately, the targeted compensating control is to avoid invoking Python omni-completion on untrusted buffers: do not set omnifunc to python3complete#Complete / pythoncomplete#Complete (and avoid triggering it via Ctrl-X Ctrl-O) when editing files from untrusted sources, or remove/empty the runtime/autoload/python3complete.vim and pythoncomplete.vim scripts so the completion path cannot run - the trade-off is loss of Python autocompletion. As a broader mitigation, treat untrusted source files as hostile and edit them in a sandboxed or unprivileged context, since the injected code runs with the editing user's privileges; note this does not prevent execution, only contains its blast radius.

Affected VersionsENISA

vim < 9.2.0699

Affected Packages

euvd vim fix: 9.2.0699

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 flaw lives in Vim's Python omni-completion runtime scripts (runtime/autoload/python3complete.vim and runtime/autoload/pythoncomplete.vim). To build a completion dictionary, these plugins parse the current buffer and reconstruct source for each function/class scope, then evaluate it with Python's exec(). The vulnerable code path concatenated a scope's docstring directly into a triple-quoted Python string literal ('"""'+self.docstr+'"""'). This is a textbook CWE-94 (Improper Control of Generation of Code, i.e., code injection): untrusted text from the buffer becomes executable code because string boundaries are not sanitized. The fix replaces the naive concatenation with repr(self.docstr), which produces a safely-quoted Python string literal that cannot break out of its delimiters. The affected component is platform-independent but only active when a Python-enabled Vim build uses the Python omni-completion feature.

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

Local vector because the victim must open the file and invoke completion (UI:R); no target auth needed (PR:N), and exec() of injected Python yields full C/I/A impact at user scope.

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.8 HIGH

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
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 25, 2026 - 17:02 EUVD

DescriptionCVE.org

Vim is an open source, command line text editor. Prior to 9.2.0699, Vim's Python omni-completion (runtime/autoload/python3complete.vim and the legacy pythoncomplete.vim) executes reconstructed function and class definitions from the current buffer with exec() as part of populating the completion dictionary. When reconstructing that source, each scope's docstring is inserted verbatim between triple quotes with no escaping, so a hostile buffer can break out of the triple-quoted literal and execute attacker-controlled Python during omni-completion. This vulnerability is fixed in 9.2.0699.

Executive ViewAI

Why It Matters

Vim before 9.2.0699 can execute arbitrary code when users interact with malicious files through Python autocompletion; no public exploit identified at time of analysis. This vulnerability directly threatens development and DevOps teams, potentially enabling system compromise and unauthorized access to source code repositories and credentials.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Immediately disable Python omnifunc in .vimrc configurations; restrict Vim usage for opening untrusted or externally-sourced files; implement file sandboxing and validation for external content processing; monitor for unexpected Python execution from Vim processes. Establish patching plan for Vim 9.2.0699 or later when vendor releases fix.

Threat Intelligence Overview

EPSS Score
0.1%
Top 96% exploitable
Prevalence
Ubiquitous
Vim ships on virtually all Unix/Linux systems and is widely used
Data Quality
6 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.1%
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
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
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-4187 HIGH POC
7.8 Dec 29

vim is vulnerable to Use After Free. Rated high severity (CVSS 7.8), this vulnerability is no authentication required, l

CVE-2021-4173 HIGH POC
7.8 Dec 27

vim is vulnerable to Use After Free. Rated high severity (CVSS 7.8), this vulnerability is no authentication required, l

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

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