{"id":"CVE-2025-26603","aliases":["CVE-2025-26603"],"related":[],"kind":"vulnerability","state":"published","title":"heap-use-after-free in function str_to_reg in vim/vim","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"VIM es una versión muy mejorada del buen editor de Unix VI. VIM permite redirigir mensajes de pantalla utilizando el comando `: redir` ex para registrarse, variables y archivos. También permite mostrar el contenido de los registros utilizando el comando `: Registros` o`: Display` ex. Al redirigir la salida de `: Display` a un registro, VIM liberará el contenido de registro antes de almacenar el nuevo contenido en el registro. Ahora, al redirigir el comando `: Display` a un registro que se muestra, VIM liberará el contenido mientras que poco después intenta acceder a él, lo que conduce a un use-after-free. VIM PRE 9.1.1115 verifica la función ex_display (), que no intenta redirigir a un registro al mostrar este registro al mismo tiempo. Sin embargo, esta verificación no está completa, por lo que VIM no verifica los registros `+` y `*` que generalmente donan los registros X11/Portapaplos, y cuando una conexión de portapapeles no es posible volverá a usar el registro 0. Patch 9.1.1115 VIM, por lo tanto, se saltará la salida para registrar cero al intentar redirigir a los registros de portapapeles `*` o `+`. No se conocen workarounds para esta vulnerabilidad.","source":"nvd"}],"published":"2025-02-18T19:04:24.273Z","modified":"2026-06-17T09:02:06.700Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L","score":4.2,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L","score":4.2,"rating":"MEDIUM"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"version":"< 9.1.1115","status":"affected"}],"vendor":"vim","product":"vim","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"9.1.1115"}],"vendor":"vim","product":"vim","cpe":"cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"hci_compute_node","cpe":"cpe:2.3:h:netapp:hci_compute_node:-:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/vim/vim/security/advisories/GHSA-63p5-mwg2-787v","tags":["vendor-advisory","x-refsource-confirm"],"sources":["cvelist","nvd"]},{"url":"https://github.com/vim/vim/commit/c0f0e2380e5954f4a52a131bf6b8","tags":["patch","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://security.netapp.com/advisory/ntap-20250306-0003/","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-02-19T14:42:36.300Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-26603","url":"https://www.cve.org/CVERecord?id=CVE-2025-26603","licence":"CVE Terms of Use","modified":"2025-03-07T00:10:51.265Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-26603","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-26603","licence":"Public domain","modified":"2026-06-17T09:02:06.700Z"}],"updatedAt":"2026-11-25T22:58:54.160Z","epss":{"score":0.0024,"percentile":0.16165,"date":"2026-12-01T12:00:22.000Z"}}