JLSEC-2026-1836: Use After Free
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 9.1.0764
Event History
Frequently Asked Questions
Who is realistically exposed to this issue?
Exposure is limited to Vim installations with a user-defined BufWinLeave autocommand that reopens the same buffer in a new split window while the buffer is being closed. The issue also requires running buffer-unload commands.
What does an attacker or triggering condition need to cause the problem?
The problematic BufWinLeave autocommand must already have been intentionally configured, and the affected buffer must be closed while visible in a window. Exploitation depends on that autocommand reopening the same buffer in a new split window.
What is the expected impact?
The documented impact is a crash caused by a use-after-free condition. No confidentiality or integrity impact is identified in the provided severity vector.
What should teams do if they cannot upgrade immediately?
No known workaround is available. Users should upgrade Vim to version 9.1.0764 or later.