Heap-based Buffer Overflow in Vim: Critical Vulnerability Detected

vim Updated 02 Oct 2025

Summary

14/03/2022
N/A
Yes i
High
7.8

ALPINE-CVE-2022-0943: Heap-based Buffer Overflow occurs in vim in GitHub repository vim/vim prior to 8.2.4563. Affects vim versions < 8.2.4619-r0. Fixed in 8.2.4619-r0. 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 Penetration testing for web, API and mobile 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 by developers and system administrators for its powerful features, including syntax highlighting, multi-level undo, and extensive plugin support. However, a critical vulnerability has been identified in Vim versions prior to 8.2.4619, which exposes users to potential security risks.

Vulnerability Detail

The vulnerability, identified as CVE-2022-0943, is a heap-based buffer overflow that occurs in Vim prior to version 8.2.4619. This flaw can be exploited by attackers to execute arbitrary code, potentially leading to unauthorized access or data corruption. The issue arises from improper handling of memory, which can be triggered by specially crafted input, making it a significant risk for users who process untrusted data.

How To Fix

Minimum fixed version

8.2.4619-r0

This is the first release that contains the fix.

sudo apk add --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 processing untrusted input or disable features that may trigger the vulnerability until the update is applied.

Conclusion

The heap-based buffer overflow vulnerability in Vim poses a significant risk to users, allowing for potential arbitrary code execution. It is crucial to update to the patched version 8.2.4619 or later to mitigate this risk. Additionally, utilizing tools like Vulert can help monitor and manage vulnerabilities in your software effectively.

See every vulnerability recorded for vim →

Share this vulnerability

FAQ

CVE-2022-0943 is a critical vulnerability in Vim 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 the terminal. If it is below 8.2.4619, it is vulnerable.

Failure to address this vulnerability may result in unauthorized access to your system, data corruption, or other malicious activities.

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

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Related vulnerabilities

Recent vulnerabilities recorded for vim.

How To Fix

Minimum fixed version

8.2.4619-r0

This is the first release that contains the fix.

sudo apk add --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