Vim Buffer Overflow Vulnerability - CVE-2024-43790

vim Updated 03 Oct 2025

Summary

22/08/2024
N/A
No i
Unrated
Not published

UBUNTU-CVE-2024-43790: Vim is an open source command line text editor. Affects vim versions 2:7.4.000-1ubuntu2 – 2:7.4.052-1ubuntu3.1+esm9. No fix is published. 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 widely used open-source command line text editor known for its efficiency and versatility in editing text files. It supports various programming languages and offers features like syntax highlighting, multi-level undo, and customizable key mappings. However, it is susceptible to vulnerabilities that can compromise its functionality and user security.

Vulnerability Detail

The vulnerability identified as CVE-2024-43790 arises when Vim performs a search while displaying the search-count message is disabled. In this scenario, if the right-left mode is enabled and the search pattern contains ASCII NUL characters, it leads to a buffer overflow. This occurs because the buffer allocated for the reversed search pattern is smaller than the original due to the strlen() function's behavior, which stops counting at the first NUL byte. Consequently, this can cause memory corruption and potentially allow an attacker to execute arbitrary code.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can avoid enabling the right-left mode (:set rl) while performing searches in Vim until the package is updated to the patched version.

Conclusion

The CVE-2024-43790 vulnerability in Vim poses a significant risk due to its potential for buffer overflow and arbitrary code execution. Users are advised to update their Vim installations to the latest patched version to mitigate these risks. Additionally, utilizing tools like Vulert can help in monitoring and managing open-source vulnerabilities effectively.

See every vulnerability recorded for vim →

Share this vulnerability

FAQ

CVE-2024-43790 is a vulnerability in Vim that can lead to a buffer overflow when certain conditions are met during text searches.

You can check your Vim version by running 'vim --version' in the terminal. If it is below the patched version (v9.1.0689), it is vulnerable.

Exploiting this vulnerability could allow an attacker to execute arbitrary code, potentially compromising the user's system.

Yes, tools like Vulert can monitor and alert you in real-time for open-source vulnerabilities in your software without requiring code access.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability by simply uploading your manifest file.

Related vulnerabilities

Recent vulnerabilities recorded for vim.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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