Critical Memory Access Vulnerability in Vim Package

vim Updated 02 Oct 2025

Summary

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

UBUNTU-CVE-2022-0351: Access of Memory Location Before Start of Buffer in GitHub repository vim/vim prior to 8.2. Affects vim versions < 2:7.4.052-1ubuntu3.1+esm9. Fixed in 2:7.4.052-1ubuntu3.1+esm9. 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 by developers and system administrators for its powerful features and extensibility. The package is known for its versatility, supporting various programming languages and file formats. However, it has been found to have a critical vulnerability that allows unauthorized access to memory locations, potentially leading to data corruption or unauthorized code execution.

Vulnerability Detail

The vulnerability, identified as CVE-2022-0351, arises from improper handling of memory access within the Vim codebase prior to version 8.2. This flaw allows attackers to access memory locations before the start of a buffer, which can lead to information disclosure, data corruption, or arbitrary code execution. The severity of this vulnerability is underscored by its CVSS score of 7.8, indicating a high risk to systems running affected versions of Vim.

How To Fix

Minimum fixed version

2:7.4.052-1ubuntu3.1+esm9

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 limit the use of Vim in sensitive environments until the package is updated. Additionally, users can consider using alternative text editors that do not exhibit this vulnerability.

Conclusion

The CVE-2022-0351 vulnerability in the Vim package poses a significant risk to users due to its potential for unauthorized memory access. It is crucial for users to update their Vim installations to the latest patched versions to mitigate this risk. Utilizing tools like Vulert can help in monitoring and managing vulnerabilities effectively.

See every vulnerability recorded for vim →

Share this vulnerability

FAQ

CVE-2022-0351 is a vulnerability in the Vim text editor that allows unauthorized access to memory locations, potentially leading to data corruption or arbitrary code execution.

You can check if your version of Vim is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor and alert for open-source vulnerabilities in your software.

If you cannot update Vim immediately, consider using alternative text editors and limit the use of Vim in sensitive environments until the update can be applied.

The potential consequences include unauthorized access to sensitive data, data corruption, and the possibility of executing arbitrary code, which can compromise system integrity.

Yes, Vulert provides a service that allows you to monitor and alert for open-source vulnerabilities in your software using just a manifest file like package-lock.json.

Related vulnerabilities

Recent vulnerabilities recorded for vim.

How To Fix

Minimum fixed version

2:7.4.052-1ubuntu3.1+esm9

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