Medium severity · published Jan 13, 2025
CVE-2025-22134
heap-buffer-overflow with visual mode in Vim < 9.1.1003
5.5
CVSS
0.4%
EPSS
No
On KEV
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
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Attack vector
Local
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
None
Integrity
None
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.4% · higher than 31% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
VI
vim · vim
< v9.1.1003 · source: vendor, NVD
BO
Bootstrap OS · Netapp
All versions, or not specified · source: NVD
NE
Neovim · Neovim
through 0.10.4 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-22134
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-22134
Patch
https://github.com/vim/vim/commit/c9a1e257f1630a0866447e53a564f7ff96a80ead
Vendor Advisory
https://github.com/vim/vim/security/advisories/GHSA-5rgf-26wj-48v8
Mailing List
http://www.openwall.com/lists/oss-security/2025/01/11/1
Third Party Advisory
https://security.netapp.com/advisory/ntap-20250314-0004/
More from vim
9.8
CVE-2020-20703
Buffer Overflow vulnerability in VIM v.8.1.2135 allows a remote attacker to execute arbitrary code via the operand parameter
9.8
CVE-2022-3520
Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.0765
9.8
CVE-2022-0318
Heap-based Buffer Overflow in vim/vim prior to 8.2
9.8
CVE-2017-6350
An integer overflow at an unserialize_uep memory allocation site would occur for vim before patch 8.0.0378, if it does not properly validate values for tree length when reading a…
9.8
CVE-2017-6349
An integer overflow at a u_read_undo memory allocation site would occur for vim before patch 8.0.0377, if it does not properly validate values for tree length when reading a…
