CVE-2025-55157 Vim heap use-after-free vulnerability when processing recursive tuple data types
A use-after-free in Vim allows attackers to cause memory corruption and potentially execute code by tricking users into running malicious Vim scripts.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2025-55157?
CVE-2025-55157 is a medium-severity use after free vulnerability in Vim Vim, published on 11 Aug 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-416
Which versions are affected by CVE-2025-55157?
It affects 1 product.
Products include Vim Vim.
How do I fix CVE-2025-55157?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2025-55157 being exploited?
There is no known exploitation of CVE-2025-55157 in the wild and no public exploit code.
Other vulnerabilities in Vim Vim
Sources
Also known as BELL-CVE-2025-55157, GHSA-3r4f-mm4w-wgg6.