# CVE-2025-55158: Vim double-free vulnerability during Vim9 script import operations

- Severity: Medium 6.9 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.43%, higher than 39% of CVEs (2026-12-01)
- Published: 2025-08-11T22:54:12.015Z
- Modified: 2026-06-17T09:41:22.447Z
- Weaknesses: CWE-415
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Vim is an open source, command line text editor. In versions from 9.1.1231 to before 9.1.1406, when processing nested tuples during Vim9 script import operations, an error during evaluation can trigger a double-free in Vim’s internal typed value (typval_T) management. 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 vulnerability can only be triggered if a user explicitly opens and executes a specially crafted Vim script. This issue has been patched in version 9.1.1406.

(As written by CVE List.)

## Affected

- vim vim: >= 9.1.1231, < 9.1.1406; from 9.1.1231 before 9.1.1406

## Every score

- GitHub_M: CVSS:4.0 6.9 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/vim/vim/security/advisories/GHSA-5fg8-wvx3-583x> (vendor-advisory)
- <https://github.com/vim/vim/commit/9772025d24e939fd84b85748ce35c26874c05775> (patch)
- <https://github.com/vim/vim/releases/tag/v9.1.1406> (patch)

## Sources

- CVE List: [CVE-2025-55158](https://www.cve.org/CVERecord?id=CVE-2025-55158), CVE Terms of Use, modified 2025-08-12
- NVD: [CVE-2025-55158](https://nvd.nist.gov/vuln/detail/CVE-2025-55158), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-55158 · Whole record: https://cve.day/CVE-2025-55158.json · Rebuilt by cve.day 2026-11-25T22:59:02.288Z
