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

Medium 4.5 Published Updated

A double-free vulnerability in Vim allows a crash when closing windows with specific non-default flags, requiring user interaction to exploit.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-41957?

CVE-2024-41957 is a medium-severity use after free vulnerability in Vim Vim, published on 1 Aug 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

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

Weakness: CWE-415

Which versions are affected by CVE-2024-41957?

It affects 1 product.

Products include Vim Vim.

How do I fix CVE-2024-41957?

Upgrade to a fixed version.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2024-41957 being exploited?

There is no known exploitation of CVE-2024-41957 in the wild and no public exploit code.

All Vim Vim vulnerabilities

Sources

Also known as ALPINE-CVE-2024-41957, AZL-47340, AZL-47388, BELL-CVE-2024-41957, DEBIAN-CVE-2024-41957, ECHO-7439-9991-63cf and 4 more.

Is CVE-2024-41957 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free