Vulnerability · Published Aug 15, 2024 · Assigned by GitHub_M

CVE-2024-43374Vim heap-use-after-free in src/arglist.c:207

Medium 4.5

In plain English

A medium-severity use-after-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.3% (higher than 29% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

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

Official description

The UNIX editor Vim prior to version 9.1.0678 has a use-after-free error in argument list handling. When adding a new file to the argument list, this triggers `Buf*` autocommands. If in such an autocommand the buffer that was just opened is closed (including the window where it is shown), this causes the window structure to be freed which contains a reference to the argument list that we are actually modifying. Once the autocommands are completed, the references to the window and argument list are no longer valid and as such cause an use-after-free. Impact is low since the user must either intentionally add some unusual autocommands that wipe a buffer during creation (either manually or by sourcing a malicious plugin), but it will crash Vim. The issue has been fixed as of Vim patch v9.1.0678.

Affected packages & fixed versions

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

Affected products (as reported)

VendorProductVersions
vim vim < 9.1.0678

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

References