Vim Double-Free Vulnerability in Typed Value Management

Vulnerability

A double-free vulnerability has been identified in Vim versions 9.1.1231 prior to 9.1.1406. This issue arises during the processing of nested tuples in Vim9 script imports, where an evaluation error can lead to improper memory management. The clear_tv() function may attempt to deallocate memory that has already been freed, creating a potential for memory corruption. This vulnerability can only be exploited if a user manually executes a specially crafted Vim script.

Impact

Exploitation of this vulnerability leads to a denial-of-service condition by causing the application to crash. However, due to the nature of memory corruption, it could potentially be exploited for more severe consequences, depending on the execution environment.

Reproduction

The vulnerability can be reproduced by importing a specially crafted Vim9 script that contains nested tuples. This script should be designed to trigger an evaluation error, which will cause the double-free condition in Vim's typed value management.

Remediation

Users can upgrade to Vim version 9.1.1406 or later to address this vulnerability.

Added: Aug 11, 2025, 11:21 PM
Updated: Aug 11, 2025, 11:21 PM

Vulnerability Rating

Custom Algorithm
spread
7.8
impact
2.5
exploitability
5.4
remediation
7.7
relevance
0.3
threat
4.8
urgency
2.9
incentive
0.8

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.