Critical Use After Free Vulnerability in Vim Package

vim Updated 02 Oct 2025

Summary

22/09/2022
N/A
Yes i
High
7.8

UBUNTU-CVE-2022-3256: Use After Free in GitHub repository vim/vim prior to 9.0.0530. Affects vim versions < 2:7.4.052-1ubuntu3.1+esm13. Fixed in 2:7.4.052-1ubuntu3.1+esm13. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Vim is a highly configurable text editor built to enable efficient text editing. It is widely used across various platforms for programming and general text manipulation. The package is known for its powerful features, including syntax highlighting, multi-level undo, and extensive plugin support. However, it has been identified to have a critical vulnerability that could allow attackers to exploit the software.

Vulnerability Detail

The vulnerability, identified as CVE-2022-3256, is a Use After Free issue in the Vim package prior to version 9.0.0530. This flaw allows an attacker to potentially execute arbitrary code, leading to unauthorized access or control over the affected system. The vulnerability arises from improper memory management, which can be exploited under certain conditions, making it a significant risk for users of the affected versions.

How To Fix

Minimum fixed version

2:7.4.052-1ubuntu3.1+esm13

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 features that may trigger the vulnerability until the package is updated. Additionally, running Vim in a restricted environment or using alternative text editors can mitigate the risk until a fix is applied.

Conclusion

The Use After Free vulnerability in the Vim package poses a significant risk to users, allowing potential arbitrary code execution. It is crucial for users to update to the latest patched version to mitigate this risk. Regular monitoring for vulnerabilities using tools like Vulert can help maintain software security.

See every vulnerability recorded for vim →

Share this vulnerability

FAQ

CVE-2022-3256 is a critical Use After Free vulnerability found in the Vim text editor, which can lead to arbitrary code execution.

You can check your version of Vim by running 'vim --version' in your terminal. Compare it against the patched versions listed in the vulnerability report.

Exploitation of this vulnerability could allow attackers to execute arbitrary code, potentially leading to unauthorized access or control over the affected system.

Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using a manifest file like package-lock.json.

Detailed information can be found in the official security notices and vulnerability databases, including the Ubuntu security notices page.

Related vulnerabilities

Recent vulnerabilities recorded for vim.

How To Fix

Minimum fixed version

2:7.4.052-1ubuntu3.1+esm13

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 →

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