# CVE-2025-22134: heap-buffer-overflow with visual mode in Vim \< 9.1.1003

- Priority: **Routine**
- Reason: Not severe (CVSS 4.2, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-01-13 · Modified: 2025-03-14
- Aliases: ALPINE-CVE-2025-22134, MGASA-2025-0014, UBUNTU-CVE-2025-22134, USN-7220-1, DEBIAN-CVE-2025-22134
- Record: https://cvemate.com/vulnerability/CVE-2025-22134 · JSON: https://cvemate.com/vulnerability/CVE-2025-22134/json

## Description

```text
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
```

## Signals

- CVSS: 5.5 medium (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- EPSS: 0.375%, percentile 33.502%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine vim (Alpine Linux): \< 9.1.1003-r0
- debian vim (Debian): All versions (No fix recorded) \| \< 2:9.1.1113-1
- ubuntu vim (Ubuntu): All versions (No fix recorded) \| \< 2:8.1.2269-1ubuntu5.30 \| \< 2:8.2.3995-1ubuntu2.22 \| \< 2:9.1.0016-1ubuntu7.6
- mageia vim (Mageia): \< 9.1.1012-1.mga9
- neovim neovim: ≤ 0.10.4
- netapp bootstrap\_os: na
- vim vim: \< v9.1.1003 \| ≤ 9.1.1003

## References

- <https://github.com/vim/vim/security/advisories/GHSA-5rgf-26wj-48v8>
- <https://github.com/vim/vim/commit/c9a1e257f1630a0866447e53a564f7ff96a80ead>
- <http://www.openwall.com/lists/oss-security/2025/01/11/1>
- <https://security.netapp.com/advisory/ntap-20250314-0004/>
- <https://security.alpinelinux.org/vuln/CVE-2025-22134>
- <https://advisories.mageia.org/MGASA-2025-0014.html>
- <https://bugs.mageia.org/show_bug.cgi?id=33911>
- <https://openwall.com/lists/oss-security/2025/01/11/1>
- <https://ubuntu.com/security/CVE-2025-22134>
- <https://www.cve.org/CVERecord?id=CVE-2025-22134>
- <https://ubuntu.com/security/notices/USN-7220-1>
- <https://security-tracker.debian.org/tracker/CVE-2025-22134>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-22134>

---

Data as of 2026-12-05T03:09:58.865Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
