Heap Use-After-Free Vulnerability in Vim Package

vim Updated 02 Oct 2025

Summary

22/11/2023
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2023-48706: Vim is a UNIX editor that, prior to version 9.0.2121, has a heap-use-after-free vulnerability. Affects vim versions < 2:9.0.2189-1. Fixed in 2:9.0.2189-1. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Vim is a highly configurable text editor built to enable efficient text editing. It is widely used in UNIX environments and is known for its powerful features, including syntax highlighting, multi-level undo, and extensive plugin support. However, prior to version 9.0.2121, Vim was susceptible to a heap-use-after-free vulnerability that could lead to memory access issues.

Vulnerability Detail

The vulnerability arises when executing a ':s' command for the first time while using a sub-replace-special atom in the substitution part. This can lead to a recursive ':s' call that inadvertently frees memory, which may later be accessed by the initial ':s' command. This flaw can cause crashes in Vim and requires the user to intentionally execute a specific payload, making it somewhat tricky to exploit reliably.

How To Fix

Minimum fixed version

2:9.0.2189-1

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

Currently, there are no specific workarounds mentioned for this vulnerability. The best course of action is to update to the patched version as soon as possible.

Conclusion

The heap-use-after-free vulnerability in Vim poses a significant risk to users running versions prior to 9.0.2121. It is crucial to update to the patched version to mitigate potential crashes and security risks. Regular monitoring for vulnerabilities using tools like Vulert can help maintain software security.

See every vulnerability recorded for vim →

Share this vulnerability

FAQ

A heap-use-after-free vulnerability occurs when a program continues to use a memory location after it has been freed, potentially leading to crashes or arbitrary code execution.

You can check your version of Vim by running 'vim --version' in the terminal. If it is below 2:9.0.2189-1, it is affected.

While the vulnerability requires specific conditions to be met, it can be exploited by a knowledgeable user who intentionally executes the payload.

Exploitation of this vulnerability can lead to crashes in Vim and may allow an attacker to execute arbitrary code, compromising the system.

You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using a manifest file like package-lock.json. You can check for vulnerabilities without signup at the Vulert playground.

Related vulnerabilities

Recent vulnerabilities recorded for vim.

How To Fix

Minimum fixed version

2:9.0.2189-1

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