Critical Vulnerability in Vim Package: Command Execution via Malicious Tar Archives
Summary
DEBIAN-CVE-2025-27423: Vim is an open source, command line text editor. Affects vim versions < 2:9.1.1230-1. Fixed in 2:9.1.1230-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Vim is a widely used open-source command line text editor known for its efficiency and versatility in editing text files. It supports various plugins, including tar.vim, which facilitates the editing and viewing of tar files. However, a recent vulnerability has been identified in the tar.vim plugin that poses a significant security risk.
Vulnerability Detail
The vulnerability arises from the tar.vim plugin, which, starting from version 9.1.0858, utilizes the ':read' ex command to append content below the cursor position. The input from the tar archive is not sanitized, allowing specially crafted tar files to execute shell commands. The risk is contingent on the shell being used, as determined by the 'shell' option set in the environment variable $SHELL. This could lead to unauthorized command execution, potentially compromising the system's security.
How To Fix
Minimum fixed version
2:9.1.1230-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade vim
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users can avoid using the tar.vim plugin until they can update to the patched version. Additionally, users can configure their shell settings to limit the execution of commands from untrusted sources.
Conclusion
The identified vulnerability in the Vim package poses a serious risk due to the potential for command execution via malicious tar files. Users are strongly advised to update to the latest patched version to mitigate this risk. Additionally, employing monitoring tools like Vulert can enhance security by providing real-time alerts for vulnerabilities.
See every vulnerability recorded for vim →
FAQ
The vulnerability allows for command execution through untrusted tar archives due to unsanitized input in the tar.vim plugin.
You can check your Vim version by running 'vim --version' in the terminal. If it is below 2:9.1.1230-1, it is vulnerable.
Exploitation of this vulnerability could allow an attacker to execute arbitrary commands on the system, leading to data breaches or system compromise.
Yes, tools like Vulert can monitor and alert you in real-time for open-source vulnerabilities in your software without requiring code access.
Detailed information can be found in the Debian CVE database or by visiting the Vulert playground at Vulert Scanner.
References
Related vulnerabilities
Recent vulnerabilities recorded for vim.