Vim is a UNIX editor that, prior to version 9.0.2121, has a heap-use-after-free vulnerability. When executing a `:s` command for the very first time and using a sub-replace-special atom inside the substitution part, it is possible that the recursive `:s` call causes free-ing of memory which may later then be accessed by the initial `:s` command. The user must intentionally execute the payload and the whole process is a bit tricky to do since it seems to work only reliably for the very first :s command. It may also cause a crash of Vim. Version 9.0.2121 contains a fix for this issue.
NVD Severity
Other trackers
Mailing lists
GitHub (code, issues), Aports (code, issues)


Type URI

Match rules

CPE URI Source package Min version Max version
cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:* vim >= None < 9.0.2121

Vulnerable and fixed packages

Source package Branch Version Maintainer Status
vim 3.18-main 9.0.2073-r0 Natanael Copa <> possibly vulnerable
vim 3.17-main 9.0.0999-r0 Natanael Copa <> possibly vulnerable
vim 3.15-main 8.2.4836-r1 Natanael Copa <> possibly vulnerable
vim 3.16-main 8.2.5000-r1 Natanael Copa <> possibly vulnerable
vim 3.19-main 9.0.2127-r0 Natanael Copa <> fixed