Stack-based Buffer Overflow in vim/vim

vim Updated 02 Oct 2025

Summary

17/02/2022
N/A
Yes i
High
7.8

CVE-2022-0629: Stack-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 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 in various operating systems and provides a range of features for developers and users. However, a vulnerability has been discovered in versions prior to 8.2, which allows for a stack-based buffer overflow.

Vulnerability Detail

The vulnerability, identified as CVE-2022-0629, originates from an issue in the GitHub repository vim/vim. It can be exploited by an attacker to execute arbitrary code by overflowing the stack. This could lead to various consequences, including remote code execution, privilege escalation, or denial of service attacks. The severity of this vulnerability is rated as high, with a CVSS score of 7.8.

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 consider limiting access to the vulnerable application or implementing network-level controls to prevent potential exploitation. However, applying the official fix is strongly advised to fully address the vulnerability.

Conclusion

In conclusion, the stack-based buffer overflow vulnerability in vim/vim prior to version 8.2 poses a significant risk to users. It is crucial to update to the fixed version or apply the recommended workaround to mitigate the potential consequences. For further assistance with vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for vim →

Share this vulnerability

FAQ

The vulnerability allows an attacker to execute arbitrary code, potentially leading to remote code execution, privilege escalation, or denial of service attacks.

Versions prior to 8.2 are affected by this vulnerability.

Yes, updating the vim package to version 8.2.4619-r0 or later will fix the vulnerability.

While limiting access to the vulnerable application or implementing network-level controls can provide temporary protection, applying the official fix is recommended.

The CVSS score of this vulnerability is 7.8, indicating a high severity.

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