CVE-2025-22134 heap-buffer-overflow with visual mode in Vim < 9.1.1003
A heap-buffer overflow in Vim allows attackers to cause crashes or potentially execute code when visual mode is active during buffer switching.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2025-22134?
CVE-2025-22134 is a medium-severity memory corruption vulnerability in Netapp Bootstrap Os, published on 13 Jan 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
When switching to other buffers using the :all command and visual mode still being active, this may cause a heap-buffer overflow, because Vim does not properly end visual mode and therefore may try to access beyond the end of a line in a buffer. In Patch 9.1.1003 Vim will correctly reset the visual mode before opening other windows and buffers and therefore fix this bug. In addition it does verify that it won't try to access a position if the position is greater than the corresponding buffer line. Impact is medium since the user must have switched on visual mode when executing the :all ex command. The Vim project would like to thank github user gandalf4a for reporting this issue. The issue has been fixed as of Vim patch v9.1.1003
Weakness: CWE-122
Which versions are affected by CVE-2025-22134?
It affects 3 products.
Products include Neovim Neovim, Netapp Bootstrap Os, Vim Vim.
How do I fix CVE-2025-22134?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2025-22134 being exploited?
There is no known exploitation of CVE-2025-22134 in the wild and no public exploit code.
Other vulnerabilities in Netapp Bootstrap Os
Sources
Also known as ALPINE-CVE-2025-22134, AZL-55500, AZL-55582, BELL-CVE-2025-22134, CLSA-2025-1765286037, DEBIAN-CVE-2025-22134 and 6 more.