CVE-2024-41957
Vim double free in src/alloc.c:616
Reported by github_m · Published August 1, 2024
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
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| vim-common | Amazon Linux | 2:9.1.785-1.amzn2023.0.1 |
| xxd | Amazon Linux | 2:9.1.785-1.amzn2023.0.1 |
| vim-default-editor | Amazon Linux | 2:9.1.785-1.amzn2023.0.1 |
| vim-minimal | Amazon Linux | 2:9.1.785-1.amzn2023.0.1 |
| vim | Alpine | 9.1.0652-r0 |
| vim-filesystem | Amazon Linux | 2:9.1.785-1.amzn2023.0.1 |
| vim | vim | 9.1.0647 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| vim | vim | < 9.1.0647 |
| amazon:2023 | vim-common | 0 |
| amazon:2023 | xxd | 0 |
| amazon:2023 | vim-default-editor | 0 |
| amazon:2023 | vim-minimal | 0 |
| alpine | vim | 0 |
| amazon:2023 | vim-filesystem | 0 |
| vim | vim | 0 |
| amazon:2023 | vim-data | 0 |
| amazon:2023 | vim-enhanced | 0 |
Timeline
- Aug 1, 2024 CVE Published
- Aug 6, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (7 in total, the first dated here)
- Nov 4, 2025 CVE Updated
- Jan 7, 2026 Security Advisory (2 in total, the first dated here)
- Nov 22, 2026 Distribution Patch
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-41957
vulnetix vdb fixes CVE-2024-41957
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-41957/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://github.com/vim/vim/security/advisories/GHSA-f9cr-gv85-hcr4 x_refsource_CONFIRM
- https://github.com/vim/vim/commit/8a0bbe7b8aad6f8da28dee218c01bc8a0185a x_refsource_MISC
- http://www.openwall.com/lists/oss-security/2024/08/01/1 url
- https://security.netapp.com/advisory/ntap-20241129-0007/ url
- http://seclists.org/fulldisclosure/2024/Sep/33 url