Heap-based Buffer Overflow in Vim Package - CVE-2022-0261

vim Updated 02 Oct 2025

Summary

18/01/2022
N/A
No i
High
7.8

UBUNTU-CVE-2022-0261: Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2. 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, including syntax highlighting, multi-level undo, and extensive plugin support. However, a vulnerability identified as CVE-2022-0261 exposes Vim to a heap-based buffer overflow, which can lead to potential exploitation if not addressed.

Vulnerability Detail

The vulnerability stems from a heap-based buffer overflow in the Vim text editor, specifically in versions prior to 8.2. This flaw allows attackers to execute arbitrary code by crafting malicious input that exceeds the allocated buffer size. The ramifications of this vulnerability are severe, as it can lead to unauthorized access, data corruption, or system compromise. The CVSS score for this vulnerability is 7.8, indicating a high severity level.

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

If immediate patching is not feasible, consider restricting access to the Vim editor or using alternative text editors until the vulnerability is resolved. Additionally, ensure that input to Vim is sanitized to prevent exploitation.

Conclusion

CVE-2022-0261 represents a significant security risk for users of the Vim text editor due to a heap-based buffer overflow vulnerability. It is crucial to update to the latest patched version to mitigate potential threats. 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-0261 is a vulnerability in the Vim text editor that allows for a heap-based buffer overflow, potentially leading to arbitrary code execution.

You can check your Vim version by running 'vim --version' in your terminal. If it is below 2:8.2.3995-1ubuntu2.7, it is vulnerable.

The risks include unauthorized access, data corruption, and potential system compromise due to arbitrary code execution.

Yes, tools like Vulert can monitor and alert you in real-time for open-source vulnerabilities in your software without requiring code access.

More information can be found in the official Ubuntu security notices and the CVE database.

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