CVE-2025-22134

heap-buffer-overflow with visual mode in Vim < 9.1.1003

Published Jan 13, 2025 CVSS 3.1 · 4.2 Medium EPSS < 1% KEV · Not listed
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

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-2654 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
Ubuntu USN Ubuntu USN USN-7220-1 Vim vulnerability
History
Type Values Removed Values Added
First Time appeared Neovim
Neovim neovim
CPEs cpe:2.3:a:neovim:neovim:*:*:*:*:*:*:*:*
Vendors & Products Neovim
Neovim neovim
Type Values Removed Values Added
First Time appeared Netapp
Netapp bootstrap Os
Netapp hci Compute Node
CPEs cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:*
cpe:2.3:h:netapp:hci_compute_node:-:*:*:*:*:*:*:*
cpe:2.3:o:netapp:bootstrap_os:-:*:*:*:*:*:*:*
Vendors & Products Netapp
Netapp bootstrap Os
Netapp hci Compute Node
Type Values Removed Values Added
Metrics epss

{'score': 0.00011}

epss

{'score': 0.00012}

Type Values Removed Values Added
Metrics threat_severity

Moderate

threat_severity

Low

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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
Title heap-buffer-overflow with visual mode in Vim < 9.1.1003
Weaknesses CWE-122
References
Metrics cvssV3_1

{'score': 4.2, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 14, 2025, 10:03 AM
Reserved
Dec 30, 2024, 3:00 AM
Status
Analyzed
Published
Jan 13, 2025, 9:15 PM
Modified
Jun 17, 2026, 8:45 AM
Severity
Low
Public date
Jan 13, 2025, 8:41 PM