CVE-2026-28421 Vim has a heap-buffer-overflow and a segmentation fault
A heap-buffer-overflow in Vim's swap file recovery allows attackers to cause a crash or potentially execute code via crafted swap files.
- 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-2026-28421?
CVE-2026-28421 is a medium-severity memory corruption vulnerability in Vim Vim, published on 27 Feb 2026. 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. Versions prior to 9.2.0077 have a heap-buffer-overflow and a segmentation fault (SEGV) exist in Vim's swap file recovery logic. Both are caused by unvalidated fields read from crafted pointer blocks within a swap file. Version 9.2.0077 fixes the issue.
Which versions are affected by CVE-2026-28421?
It affects 1 product.
Products include Vim Vim.
How do I fix CVE-2026-28421?
Upgrade to a fixed version.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2026-28421 being exploited?
There is no known exploitation of CVE-2026-28421 in the wild and no public exploit code.
Other vulnerabilities in Vim Vim
Sources
Also known as ALPINE-CVE-2026-28421, AZL-78500, BELL-CVE-2026-28421, DEBIAN-CVE-2026-28421, ECHO-6c94-1f29-8634, GHSA-r2gw-2x48-jj5p and 2 more.