# CVE-2025-26603: heap-use-after-free in function str\_to\_reg in vim/vim

- 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-02-18 · Modified: 2025-03-07
- Aliases: ALPINE-CVE-2025-26603, MGASA-2025-0074, UBUNTU-CVE-2025-26603, DEBIAN-CVE-2025-26603
- Record: https://cvemate.com/vulnerability/CVE-2025-26603 · JSON: https://cvemate.com/vulnerability/CVE-2025-26603/json

## Description

```text
Vim is a greatly improved version of the good old UNIX editor Vi. Vim allows to redirect screen messages using the `:redir` ex command to register, variables and files. It also allows to show the contents of registers using the `:registers` or `:display` ex command. When redirecting the output of `:display` to a register, Vim will free the register content before storing the new content in the register. Now when redirecting the `:display` command to a register that is being displayed, Vim will free the content while shortly afterwards trying to access it, which leads to a use-after-free. Vim pre 9.1.1115 checks in the ex_display() function, that it does not try to redirect to a register while displaying this register at the same time. However this check is not complete, and so Vim does not check the `+` and `*` registers (which typically donate the X11/clipboard registers, and when a clipboard connection is not possible will fall back to use register 0 instead. In Patch 9.1.1115 Vim will therefore skip outputting to register zero when trying to redirect to the clipboard registers `*` or `+`. Users are advised to upgrade. There are no known workarounds for this vulnerability.
```

## Signals

- CVSS: 4.2 medium (v3.1, CVE.org) CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L
- EPSS: 0.24%, percentile 16.13%, 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.1164-r0
- debian vim (Debian): All versions (No fix recorded) \| \< 2:9.1.1230-1
- ubuntu vim (Ubuntu): \< 2:7.4.052-1ubuntu3.1+esm21 \| \< 2:7.4.1689-3ubuntu1.5+esm27 \| \< 2:8.0.1453-1ubuntu1.13+esm12 \| \< 2:8.1.2269-1ubuntu5.32 \| \< 2:8.2.3995-1ubuntu2.24 \| \< 2:9.1.0016-1ubuntu7.8
- mageia vim (Mageia): \< 9.1.1122-1.mga9
- netapp hci\_compute\_node: na
- vim vim: \< 9.1.1115

## References

- <https://github.com/vim/vim/security/advisories/GHSA-63p5-mwg2-787v>
- <https://github.com/vim/vim/commit/c0f0e2380e5954f4a52a131bf6b8>
- <https://security.netapp.com/advisory/ntap-20250306-0003/>
- <https://security.alpinelinux.org/vuln/CVE-2025-26603>
- <https://advisories.mageia.org/MGASA-2025-0074.html>
- <https://bugs.mageia.org/show_bug.cgi?id=34035>
- <https://openwall.com/lists/oss-security/2025/02/16/1>
- <https://ubuntu.com/security/CVE-2025-26603>
- <https://www.cve.org/CVERecord?id=CVE-2025-26603>
- <https://ubuntu.com/security/notices/USN-7419-1>
- <https://security-tracker.debian.org/tracker/CVE-2025-26603>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-26603>

---

Data as of 2026-12-05T06:23:01.279Z. 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
