CVE-2025-55158
Vim vulnerability analysis and mitigation

Overview

A double-free vulnerability (CVE-2025-55158) was discovered in Vim versions from 9.1.1231 to before 9.1.1406. The vulnerability affects Vim's internal typed value (typval_T) management during nested tuple processing in Vim9 script import operations. The issue was discovered through fuzz testing with AFL++ and confirmed using AddressSanitizer by Yang Luo and Yanju Chen from the Security Team at Riema Labs (GitHub Advisory).

Technical details

The vulnerability occurs when processing nested tuples during Vim9 script import operations. Specifically, the clear_tv() function may attempt to free memory that has already been deallocated, due to improper lifetime handling in the handle_import / ex_import code paths. The issue has been assigned a CVSS v3.1 base score of 8.8 (HIGH) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, and CVSS v4.0 score of 6.9 (MEDIUM) (NVD).

Impact

The primary impact is a potential denial-of-service through application crash. However, as this is a memory corruption flaw, it could theoretically be exploited for more severe consequences depending on the execution environment. The severity is considered medium because the vulnerability can only be triggered if a user explicitly opens and executes a specially crafted Vim script (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in Vim version 9.1.1406. Users are advised to upgrade to this version or later. The fix involves setting the type to VAR_UNKNOWN to prevent double-freeing of memory (GitHub Commit).

Additional resources


SourceThis report was generated using AI

Related Vim vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66476HIGH7.8
  • VimVim
  • cpe:2.3:a:vim:vim
NoYesDec 02, 2025
CVE-2025-55158MEDIUM6.9
  • VimVim
  • vim-small
NoYesAug 11, 2025
CVE-2025-55157MEDIUM6.9
  • VimVim
  • vim-data
NoYesAug 11, 2025
CVE-2025-9390MEDIUM4.8
  • VimVim
  • vim
NoYesAug 24, 2025
CVE-2025-9389MEDIUM4.8
  • VimVim
  • vim-common
NoYesAug 24, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management