Vulnerability · Published Nov 22, 2023 · Assigned by GitHub_M

CVE-2023-48706Vim has heap-use-after-free at /src/charset.c:1770:12 in skipwhite

Low 3.6

In plain English

A low-severity use-after-free in vim from vim. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 46% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)3.6Low
Exploit odds (30 days)0.5%top 54.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20vim9.0.2127-r0ALPINE-CVE-2023-48706
Alpine:v3.21vim9.0.2127-r0ALPINE-CVE-2023-48706
Alpine:v3.22vim9.0.2127-r0ALPINE-CVE-2023-48706
Alpine:v3.23vim9.0.2127-r0ALPINE-CVE-2023-48706
Alpine:v3.24vim9.0.2127-r0ALPINE-CVE-2023-48706
Debian:12vimno fix listedDEBIAN-CVE-2023-48706
Debian:13vim2:9.0.2189-1DEBIAN-CVE-2023-48706
Debian:14vim2:9.0.2189-1DEBIAN-CVE-2023-48706
Ubuntu:22.04:LTSvim2:8.2.3995-1ubuntu2.15USN-6557-1
Ubuntu:22.04:LTSvim2:8.2.3995-1ubuntu2.15UBUNTU-CVE-2023-48706
Ubuntu:24.04:LTSvim2:9.0.2116-1ubuntu2UBUNTU-CVE-2023-48706

Affected products (as reported)

VendorProductVersions
vim vim < 9.0.2121

Weakness: CWE-416 · Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:L

References