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

vim Updated 02 Oct 2025

Summary

26/01/2022
N/A
Yes i
High
7.8

ALPINE-CVE-2022-0359: Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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. However, like any software, it can be vulnerable to security issues. The vulnerability identified as CVE-2022-0359 affects multiple versions of the Vim package in Alpine Linux, exposing users to potential exploitation through a heap-based buffer overflow.

Vulnerability Detail

The vulnerability arises from a heap-based buffer overflow in the Vim text editor, which can be exploited by an attacker to execute arbitrary code. This issue is particularly concerning as it allows for remote code execution, potentially compromising the integrity and confidentiality of the system. The vulnerability has a CVSS score of 7.8, indicating a high severity level. Attackers can exploit this flaw by crafting malicious input that Vim processes, leading to unauthorized access or control over the affected system.

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

If immediate updating is not feasible, consider restricting access to the Vim application or running it in a controlled environment to mitigate potential exploitation until the package can be updated.

Conclusion

CVE-2022-0359 represents a significant security risk for users of the Vim text editor in Alpine Linux. It is crucial for users to update to the patched versions to protect their systems from potential exploitation. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for vim →

Share this vulnerability

FAQ

CVE-2022-0359 is a security vulnerability in the Vim text editor that allows for a heap-based buffer overflow, potentially leading to remote code execution.

The vulnerability affects multiple versions of Vim across various Alpine Linux releases, specifically versions prior to the patched releases.

You can use the Vulert platform to check if your application is affected by this vulnerability by uploading your manifest file or using the Vulert playground.

If you cannot update Vim right away, consider implementing access restrictions or running Vim in a secure environment to limit exposure.

The CVSS score of CVE-2022-0359 is 7.8, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for vim.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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