CVE-2023-48706 Vim has heap-use-after-free at /src/charset.c:1770:12 in skipwhite
A heap-use-after-free in Vim allows attackers to execute arbitrary code or cause a crash via a crafted substitution command.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2023-48706?
CVE-2023-48706 is a low-severity use after free vulnerability in Fedoraproject Fedora, published on 22 Nov 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-416
Which versions are affected by CVE-2023-48706?
It affects 4 products.
Products include Fedoraproject Fedora, Neovim Neovim, Netapp Hci Compute Node, Vim Vim.
How do I fix CVE-2023-48706?
Upgrade to a fixed version.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2023-48706 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-48706 exists.
Other vulnerabilities in Fedoraproject Fedora
Sources
Also known as ALPINE-CVE-2023-48706, AZL-32047, BELL-CVE-2023-48706, DEBIAN-CVE-2023-48706, ECHO-b725-ea57-16d2, GHSA-c8qm-x72m-q53q and 5 more.