CVE-2025-26603 heap-use-after-free in function str_to_reg in vim/vim
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
- Technology
- UbuntuDebian
Description
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.
Upgrade path
12 packages: 10 fixed, 2 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/vim(Debian 12) | = 2:9.0.1378-2; = 2:9.0.1378-2+deb12u1; = 2:9.0.1378-2+deb12u2; = 2:9.0.1658-1 +42 more | No fix listed | No fix yet |
| netapp hci compute node | All versions | No fix listed | No fix yet |
| alpine/vim(Alpine v3.22) | < 9.1.1164-r0 | 9.1.1164-r0 | Fixed |
| alpine/vim(Alpine v3.23) | < 9.1.1164-r0 | 9.1.1164-r0 | Fixed |
| alpine/vim(Alpine v3.24) | < 9.1.1164-r0 | 9.1.1164-r0 | Fixed |
| azure linux vim(Azure Linux 3.0) | < 9.1.0791-4 | 9.1.0791-4 | Fixed |
| cbl-mariner vim(CBL-Mariner 2.0) | < 9.1.0791-4 | 9.1.0791-4 | Fixed |
| debian/vim(Debian 13) | < 2:9.1.1230-1 | 2:9.1.1230-1 | Fixed |
| debian/vim(Debian 14) | < 2:9.1.1230-1 | 2:9.1.1230-1 | Fixed |
| ubuntu/vim(Ubuntu 22.04) | < 2:8.2.3995-1ubuntu2.24 | 2:8.2.3995-1ubuntu2.24 | Fixed |
| ubuntu/vim(Ubuntu 24.04) | < 2:9.1.0016-1ubuntu7.8 | 2:9.1.0016-1ubuntu7.8 | Fixed |
| vim | < 9.1.1115; = < 9.1.1115 | 9.1.1115 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| cbl-mariner vim(CBL-Mariner:2.0) | < 9.1.0791-4 | 9.1.0791-4 |
| azure linux vim(Azure Linux:3.0) | < 9.1.0791-4 | 9.1.0791-4 |
| debian/vim(Debian:12) | All versions | No fix listed |
| debian/vim(Debian:12) | = 2:9.0.1378-2 | No fix listed |
| debian/vim(Debian:12) | = 2:9.0.1378-2+deb12u1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.0.1378-2+deb12u2 | No fix listed |
| debian/vim(Debian:12) | = 2:9.0.1658-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.0.1672-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.0.1894-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.0.2018-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.0.2087-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.0.2103-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.0.2116-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.0.2189-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.0-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.0016-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.0199-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.0374-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.0377-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.0496-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.0698-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.0709-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.0709-2 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.0777-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.0861-1 | No fix listed |
Show 33 more
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/vim(Debian:12) | = 2:9.1.0967-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.0967-2 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.1113-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.1230-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.1230-2 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.1385-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.1766-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.1829-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.1846-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.1882-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.2103-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.1.2141-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.2.0119-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.2.0136-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.2.0218-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.2.0315-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.2.0338-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.2.0355-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.2.0428-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.2.0461-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.2.0524-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.2.0782-1 | No fix listed |
| debian/vim(Debian:12) | = 2:9.2.0858-1 | No fix listed |
| debian/vim(Debian:13) | < 2:9.1.1230-1 | 2:9.1.1230-1 |
| debian/vim(Debian:14) | < 2:9.1.1230-1 | 2:9.1.1230-1 |
| vim | = < 9.1.1115 | No fix listed |
| ubuntu/vim(Ubuntu:22.04) | < 2:8.2.3995-1ubuntu2.24 | 2:8.2.3995-1ubuntu2.24 |
| alpine/vim(Alpine:v3.22) | < 9.1.1164-r0 | 9.1.1164-r0 |
| alpine/vim(Alpine:v3.23) | < 9.1.1164-r0 | 9.1.1164-r0 |
| alpine/vim(Alpine:v3.24) | < 9.1.1164-r0 | 9.1.1164-r0 |
| ubuntu/vim(Ubuntu:24.04) | < 2:9.1.0016-1ubuntu7.8 | 2:9.1.0016-1ubuntu7.8 |
| vim | < 9.1.1115 | 9.1.1115 |
| netapp hci compute node | All versions | No fix listed |
References
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- Debian Security Tracker CVE-2025-26603 vendor-advisory
- https://github.com/vim/vim/security/advisories/GHSA-63p5-mwg2-787v vendor-advisory
- https://github.com/vim/vim/commit/c0f0e2380e5954f4a52a131bf6b8 patch
- security.netapp.com third-party-advisory
- Ubuntu CVE tracker vendor-advisory
- USN-7419-1 vendor-advisory
- www.cve.org
- security.alpinelinux.org vendor-advisory