Critical Out-of-Bounds Read Vulnerability in Vim Package

vim Updated 02 Oct 2025

Summary

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

ALPINE-CVE-2022-0368: Out-of-bounds Read 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, recent vulnerabilities have raised concerns about its security, particularly the out-of-bounds read issue that can lead to potential data exposure.

Vulnerability Detail

The vulnerability identified as CVE-2022-0368 is an out-of-bounds read in the Vim package prior to version 8.2.4619-r0 for Alpine v3.12 to v3.14 and prior to version 8.2.4350-r0 for Alpine v3.16 and later. This flaw allows attackers to exploit the vulnerability, potentially leading to information disclosure or application crashes. The issue arises from improper handling of memory, which can be triggered by specially crafted input, making it critical for users to address it promptly.

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 patching is not feasible, consider restricting access to the Vim application or using alternative text editors until the update can be applied. Additionally, ensure that input to Vim is sanitized to mitigate potential exploitation.

Conclusion

The out-of-bounds read vulnerability in the Vim package poses significant risks to users. It is crucial to update to the latest patched versions to safeguard against potential exploits. Regular monitoring and vulnerability management practices, such as using tools like Vulert, can help maintain the security of your applications.

See every vulnerability recorded for vim →

Share this vulnerability

FAQ

CVE-2022-0368 is a vulnerability in the Vim text editor that allows for an out-of-bounds read, potentially leading to information disclosure.

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

Exploiting this vulnerability can lead to unauthorized information disclosure or application crashes, impacting the integrity and availability of the system.

Yes, patches are available for various versions of the Vim package. Users should update to the specified patched versions to mitigate the risk.

The CVSS score for CVE-2022-0368 is 7.8, indicating a high severity level that requires prompt attention.

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