Use After Free in Neovim
CVE-2023-48706
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.
Vulnerability class: Use-After-Free
Published · last modified .
CVSS v3 metric
CVSS v3 base score 3.6 (Low). Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:L.
EPSS exploit prediction
EPSS 0.005, 46.2th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Neovim
- NetApp Hci Compute Node
- Vim — versions < 9.0.2121
- Fedoraproject Fedora — versions 38, 39
Weakness classification (CWE)
Public exploits and proof-of-concept code
Also mentioned in 1 other repository (gandalf4a/crash_report). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- https://github.com/vim/vim/security/advisories/GHSA-c8qm-x72m-q53q (Exploit, Vendor Advisory)
- https://github.com/vim/vim/pull/13552 (Patch, Issue Tracking)
- https://github.com/vim/vim/commit/26c11c56888d01e298cd8044caf860f3c26f57bb (Patch)
- https://github.com/gandalf4a/crash_report/blob/main/vim/vim_huaf (Exploit)
- www.openwall.com/lists/oss-security/2023/11/22/3 (Patch, Mailing List, Third Party Advisory)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/… (Vendor Advisory)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/… (Vendor Advisory)
- security.netapp.com/advisory/ntap-20240105-0001/ (Vendor Advisory)