Critical Vulnerability in Vim Package: Shell Command Execution via Malicious Tar Archives
Summary
UBUNTU-CVE-2025-27423: Vim is an open source, command line text editor. Affects vim versions 2:7.4.000-1ubuntu2 – 2:7.4.052-1ubuntu3.1+esm9. No fix is published. 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 includes 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, which could potentially allow attackers to execute shell commands through specially crafted tar archives.
Vulnerability Detail
The vulnerability arises from the tar.vim plugin in Vim versions starting from 9.1.0858, where the ':read' ex command appends content below the cursor position without sanitizing the input from the tar archive. This oversight allows malicious users to execute arbitrary shell commands if the shell option is set to a vulnerable shell. The issue has been addressed in Vim patch v9.1.1164, but users must ensure they are using the updated version to mitigate the risk.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, users can avoid using the tar.vim plugin or refrain from opening tar files from untrusted sources until the package is updated to the patched version.
Conclusion
The identified vulnerability in the Vim package poses a significant risk by allowing the execution of shell commands through malicious tar archives. Users are advised to update their Vim installations to the patched version to safeguard against potential exploits. Additionally, utilizing tools like Vulert can help in monitoring and managing open-source vulnerabilities effectively.
See every vulnerability recorded for vim →
FAQ
The vulnerability allows for the execution of shell commands via specially crafted tar archives due to improper sanitization of input in the tar.vim plugin.
You can check your Vim version by running the command 'vim --version' in the terminal. If your version is 9.1.0858 or later but before 9.1.1164, it is vulnerable.
If an immediate update is not possible, avoid using the tar.vim plugin and do not open tar files from untrusted sources.
Vulert monitors and alerts for open-source vulnerabilities in your software using just a manifest file like package-lock.json, without requiring code access or installation.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.
Related vulnerabilities
Recent vulnerabilities recorded for vim.