Double-Free Vulnerability in Vim Package Leading to Potential Crashes

vim Updated 02 Oct 2025

Summary

01/08/2024
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2024-41965: Vim is an open source command line text editor. Affects vim versions < 2:9.1.0698-1. Fixed in 2:9.1.0698-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 Devnack Penetration testing for web, API and mobile 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 extensibility. It supports various programming languages and offers features like syntax highlighting, multi-level undo, and a powerful search and replace functionality. However, it is susceptible to vulnerabilities that can compromise its stability and security, such as the double-free issue identified in this report.

Vulnerability Detail

The vulnerability arises from a double-free error in the dialog_changed() function in Vim versions prior to v9.1.0648. When a user abandons a buffer and opts to save changes, Vim may create a new Untitled file if the buffer lacks a name. However, during the process of renaming the buffer to 'Unnamed', Vim erroneously frees a pointer twice. This double-free can lead to a heap-use-after-free condition, potentially causing crashes and unpredictable behavior in the application.

How To Fix

Minimum fixed version

2:9.1.0698-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

As a temporary workaround, users can avoid abandoning buffers with unsaved changes until they have updated to the patched version. Additionally, regularly saving changes to buffers can help mitigate the risk of encountering this issue.

Conclusion

The double-free vulnerability in the Vim package poses a significant risk to users, potentially leading to application crashes and data loss. It is crucial for users to update to the patched version to mitigate these 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 double-free vulnerability occurs when a program attempts to free the same memory location more than once, which can lead to memory corruption and crashes.

You can check if your Vim installation is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor for open-source vulnerabilities without requiring any signup.

The consequences may include application crashes, data loss, and potential exploitation by malicious actors to execute arbitrary code.

Yes, if the application crashes unexpectedly while handling modified buffers, there is a risk of losing unsaved changes.

It is recommended to regularly check for updates and apply patches as soon as they are released to minimize the risk of vulnerabilities.

Related vulnerabilities

Recent vulnerabilities recorded for vim.

How To Fix

Minimum fixed version

2:9.1.0698-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