MEDIUM 6.5

CVE-2026-57453: Vim Zip Plugin PowerShell Command Injection Vulnerability

Vim's bundled zip plugin has a command injection vulnerability when it falls back to PowerShell to work with zip archives on Windows systems. When you open or extract a crafted zip file with a specially designed entry name, the plugin constructs a PowerShell command that improperly quotes the filename. An attacker can exploit this quoting flaw to inject arbitrary PowerShell commands that execute with your user privileges. The vulnerability affects Vim versions 9.1.1784 through 9.2.0677 and is resolved in 9.2.0678.

Source data · NVD / CISA · public domain

CVSS
3.1 · 6.5 MEDIUM · CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
Weaknesses (CWE)
CWE-77
Affected products
1 configuration(s)
Published / Modified
2026-06-25 / 2026-06-26

NVD description (verbatim)

Vim is an open source, command line text editor. From 9.1.1784 until 9.2.0678, when the bundled zip plugin autoload/zip.vim falls back to PowerShell to browse, read, extract, update or delete entries in a zip archive, it builds the PowerShell command by inserting archive entry names that are quoted only for the shell, not for PowerShell. A crafted entry name can break out of the intended string context and cause PowerShell to execute arbitrary commands with the privileges of the user running Vim, triggered by opening, viewing or extracting the archive. This vulnerability is fixed in 9.2.0678.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability exists in autoload/zip.vim, which handles zip archive operations. When the primary zip handling method is unavailable, the plugin constructs a fallback PowerShell command to browse, read, extract, update, or delete archive entries. The flaw stems from insufficient quote escaping: entry names are quoted for shell syntax but not for PowerShell's command parsing rules. This allows a crafted entry name containing PowerShell metacharacters and command separators to escape the intended string context and inject arbitrary commands. The attack vector requires user interaction—opening or viewing the malicious zip file triggers the vulnerable code path.

Business impact

For organizations using Vim as part of their development or systems administration workflow, this vulnerability represents a localized privilege escalation risk. A developer or administrator who opens a malicious zip file from an untrusted source could have arbitrary code execute under their user account, potentially leading to credential theft, lateral movement, or data exfiltration. The impact is primarily relevant to teams that routinely handle archives from external or minimally-vetted sources. Enterprises with strict file handling policies and those restricting Vim usage may see minimal exposure.

Affected systems

Vim versions 9.1.1784 through 9.2.0677 are vulnerable when the bundled zip plugin is present and PowerShell fallback is invoked. Exposure is primarily on Windows systems where PowerShell is the fallback mechanism. Linux and macOS users are unaffected because those platforms do not use PowerShell for the fallback path. Organizations running stable Vim releases (8.2.x and earlier) are outside the vulnerable range. The vulnerability requires the zip plugin to be loaded and active, which is typical in default Vim installations.

Exploitability

Exploitation requires social engineering or supply chain compromise to deliver a malicious zip file to a Vim user. The attacker must craft a zip entry name containing PowerShell command syntax—for example, using backticks or semicolons to inject commands alongside legitimate filenames. Once a user opens or extracts the archive in Vim, the plugin automatically invokes PowerShell with the malicious entry name, executing the injected payload. The CVSS score of 6.5 (Medium) reflects the requirement for user interaction and local attack vector, balanced against the high potential impact (code execution with user privileges). The vulnerability is not listed on CISA's Known Exploited Vulnerabilities catalog as of the source data date.

Remediation

Update Vim to version 9.2.0678 or later, which includes proper quote escaping for PowerShell command construction in the zip plugin. Users unable to update immediately should avoid opening zip files from untrusted sources and consider disabling or removing the zip plugin if it is not essential to their workflow. Verify the update against your vendor's official release notes to confirm the patch version.

Patch guidance

Obtain Vim 9.2.0678 or a later stable release from the official Vim repository or your distribution's package manager. Patch testing should focus on confirming that zip archive operations (browse, extract, update, delete) continue to function correctly with both benign and edge-case filenames. Given the local, user-initiated nature of the vulnerability, prioritize patching for users who regularly handle archives from external sources or developers in security-sensitive roles. Automated deployment via configuration management is appropriate for enterprise Vim installations.

Detection guidance

Monitor for unexpected PowerShell child processes spawned by Vim, particularly processes with command-line arguments containing archive paths or suspicious syntax. Log zip plugin invocations and PowerShell fallback usage to identify when the vulnerable code path is triggered. Endpoint detection and response (EDR) tools should alert on PowerShell execution initiated by text editors, which is an anomalous pattern in most environments. For forensic purposes, examine Vim's command history and temporary file artifacts to correlate user actions with process execution.

Why prioritize this

Prioritize this vulnerability for users and teams that frequently work with zip archives, particularly in development or DevOps roles. The Medium severity score reflects a bounded but real risk: successful exploitation requires both user interaction and a crafted malicious file, but results in arbitrary code execution under the user's account. Treat this as moderate-priority in patch cycles—not critical, but warranting attention within the next 1–2 monthly update windows. Organizations with mature supply chain controls or those restricting external archive handling may deprioritize accordingly.

Risk score, explained

The CVSS 3.1 score of 6.5 (Medium) is driven by: (1) Local attack vector—exploitation requires file system access and user interaction; (2) High complexity—the attacker must craft a specific entry name with proper PowerShell syntax to break out of the string context; (3) High confidentiality and integrity impact—successful exploitation grants code execution, enabling data theft and system compromise; (4) Low availability impact—the vulnerability does not directly cause denial of service. User interaction is mandatory, which reduces the attack surface but does not eliminate the risk, particularly in supply chain scenarios where archives are received from external partners.

Frequently asked questions

Does this vulnerability affect me if I use Vim on Linux or macOS?

No. The vulnerability is specific to Windows systems where PowerShell is invoked as a fallback. Linux and macOS users are unaffected because those platforms use different shell mechanisms (typically bash or sh) for the zip plugin fallback, and the quoting flaw is specific to PowerShell's command parsing.

Can this vulnerability be exploited by just viewing a zip file in Vim, or does extraction trigger the issue?

The vulnerability is triggered by opening, viewing, or extracting a malicious zip file in Vim. Any action that causes the bundled zip plugin to interact with the archive entry names can invoke the vulnerable PowerShell fallback. You do not need to explicitly extract the file; simply browsing its contents in Vim is sufficient to trigger the code path.

Should I disable the zip plugin to be safe?

Disabling the zip plugin is a valid workaround if you do not regularly work with zip archives in Vim or if you cannot update immediately. However, the recommended approach is to update to version 9.2.0678 or later, which fixes the underlying quoting issue. Disabling the plugin reduces functionality but introduces no other side effects.

How can I determine if my Vim installation is vulnerable?

Check your Vim version by running :version in the editor or vim --version from the command line. If you are on Windows and running Vim 9.1.1784 through 9.2.0677, you are vulnerable if the zip plugin is present (it is included by default). Update to 9.2.0678 or later to resolve the issue.

This analysis is based on publicly available vulnerability data current as of June 2026. Patch version numbers and affected version ranges should be verified against official Vim release notes and security advisories. Organizations should conduct their own risk assessment based on their specific Vim deployment, user behavior, and exposure to untrusted archives. This vulnerability intelligence is provided for informational purposes and does not constitute professional security advice or a recommendation for specific remediation actions. Always consult with your security team and vendor documentation before implementing patches or operational changes. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).