Vim Zip Plugin Data Loss Vulnerability

Vulnerability

A vulnerability in Vim's zip.vim plugin, present in versions prior to 9.1.1198, can lead to potential data loss when handling specially crafted zip files. The issue arises because Vim uses the unzip command to extract files from zip archives. If a zip file contains a member named '-d/tmp', Vim will misinterpret this as an argument, causing it to extract the entire archive into the specified directory, overwriting existing files. This vulnerability requires user interaction, as the user must open the zip file in Vim and manually extract the file with the misleading name.

Impact

Exploitation of this vulnerability could result in unintended overwriting of files, leading to data loss.

Reproduction

To reproduce this vulnerability, create a zip file containing a file named '-d/tmp'. Open this zip file in Vim using the zip.vim plugin. When prompted to extract the file, Vim will incorrectly process the filename as an argument, causing it to extract the entire archive into the specified directory, overwriting any existing files.

Remediation

Users can update to Vim version 9.1.1198 or later, where this vulnerability has been fixed.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
7.8
impact
3.3
exploitability
5.4
remediation
7.7
relevance
0.0
threat
4.8
urgency
2.9
incentive
0.8

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.