Vulnerability · Published Aug 1, 2024 · Assigned by GitHub_M

CVE-2024-41957Vim double free in src/alloc.c:616

Medium 4.5

In plain English

A medium-severity double free in vim from vim. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 31% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)4.5Medium
Exploit odds (30 days)0.4%top 69.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

Vim is an open source command line text editor. Vim < v9.1.0647 has double free in src/alloc.c:616. When closing a window, the corresponding tagstack data will be cleared and freed. However a bit later, the quickfix list belonging to that window will also be cleared and if that quickfix list points to the same tagstack data, Vim will try to free it again, resulting in a double-free/use-after-free access exception. Impact is low since the user must intentionally execute vim with several non-default flags, but it may cause a crash of Vim. The issue has been fixed as of Vim patch v9.1.0647

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20vim9.1.0652-r0ALPINE-CVE-2024-41957
Alpine:v3.21vim9.1.0652-r0ALPINE-CVE-2024-41957
Alpine:v3.22vim9.1.0652-r0ALPINE-CVE-2024-41957
Alpine:v3.23vim9.1.0652-r0ALPINE-CVE-2024-41957
Alpine:v3.24vim9.1.0652-r0ALPINE-CVE-2024-41957
Debian:12vimno fix listedDEBIAN-CVE-2024-41957
Debian:13vim2:9.1.0698-1DEBIAN-CVE-2024-41957
Debian:14vim2:9.1.0698-1DEBIAN-CVE-2024-41957
Ubuntu:22.04:LTSvim2:8.2.3995-1ubuntu2.18USN-6993-1
Ubuntu:22.04:LTSvim2:8.2.3995-1ubuntu2.18UBUNTU-CVE-2024-41957
Ubuntu:24.04:LTSvim2:9.1.0016-1ubuntu7.2UBUNTU-CVE-2024-41957
Ubuntu:24.04:LTSvim2:9.1.0016-1ubuntu7.2USN-6993-1

Affected products (as reported)

VendorProductVersions
vim vim < 9.1.0647

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

References