Critical Use After Free Vulnerability in Vim Package

vim Updated 02 Oct 2025

Summary

23/08/2022
N/A
No i
High
7.8

UBUNTU-CVE-2022-2946: Use After Free in GitHub repository vim/vim prior to 9.0.0246. Affects vim versions 2:7.4.000-1ubuntu2 – 2:7.4.052-1ubuntu3.1+esm9. No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Vim is a highly configurable text editor built to enable efficient text editing. It is widely used by developers and system administrators for its powerful features and extensibility. The package is available across various Linux distributions, including Ubuntu. This vulnerability affects multiple versions of Vim, making it critical for users to address it promptly to maintain system security.

Vulnerability Detail

The vulnerability identified as CVE-2022-2946 is a Use After Free issue in the Vim text editor. This flaw originates from improper memory management, which can lead to arbitrary code execution. Attackers can exploit this vulnerability by crafting malicious input that causes Vim to access freed memory, potentially allowing them to execute arbitrary code with the privileges of the user running Vim. The severity of this vulnerability is underscored by its CVSS score of 7.8, indicating a high risk to affected systems.

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 opening untrusted files with Vim until the package is updated. This can help mitigate the risk of exploitation until a proper fix is applied.

Conclusion

The Use After Free vulnerability in the Vim package poses a significant risk to users, allowing potential attackers to execute arbitrary code. It is crucial for users to update their Vim installations to the latest patched versions to mitigate this risk. Additionally, employing tools like Vulert can help monitor and manage vulnerabilities effectively.

See every vulnerability recorded for vim →

Share this vulnerability

FAQ

CVE-2022-2946 is a Use After Free vulnerability in the Vim text editor that can lead to arbitrary code execution.

You can check your Vim version using the command 'vim --version' in the terminal. Compare it against the affected versions listed in the vulnerability report.

If you cannot update Vim right away, avoid opening untrusted files with the editor to reduce the risk of exploitation.

More information can be found in the Ubuntu Security Notices and the official CVE database.

Vulert monitors and alerts for open-source vulnerabilities in software using a manifest file like package-lock.json, providing real-time insights without requiring code access.

Related vulnerabilities

Recent vulnerabilities recorded for vim.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback