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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | vim | 9.1.0678-r0 | ALPINE-CVE-2024-43374 |
| Alpine:v3.21 | vim | 9.1.0678-r0 | ALPINE-CVE-2024-43374 |
| Alpine:v3.22 | vim | 9.1.0678-r0 | ALPINE-CVE-2024-43374 |
| Alpine:v3.23 | vim | 9.1.0678-r0 | ALPINE-CVE-2024-43374 |
| Alpine:v3.24 | vim | 9.1.0678-r0 | ALPINE-CVE-2024-43374 |
| Debian:12 | vim | no fix listed | DEBIAN-CVE-2024-43374 |
| Debian:13 | vim | 2:9.1.0698-1 | DEBIAN-CVE-2024-43374 |
| Debian:14 | vim | 2:9.1.0698-1 | DEBIAN-CVE-2024-43374 |
| Ubuntu:22.04:LTS | vim | 2:8.2.3995-1ubuntu2.18 | USN-6993-1 |
| Ubuntu:22.04:LTS | vim | 2:8.2.3995-1ubuntu2.18 | UBUNTU-CVE-2024-43374 |
| Ubuntu:24.04:LTS | vim | 2:9.1.0016-1ubuntu7.2 | UBUNTU-CVE-2024-43374 |
| Ubuntu:24.04:LTS | vim | 2:9.1.0016-1ubuntu7.2 | USN-6993-1 |
Affected products (as reported)
Weakness: CWE-416 · Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L