CVE-2022-4141 Heap-based Buffer Overflow in vim/vim

High 7.3 Published Updated

A heap-based buffer overflow in Vim allows attackers to execute arbitrary code or cause a denial of service via a crafted substitute command.

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

What is CVE-2022-4141?

CVE-2022-4141 is a high-severity memory corruption vulnerability in Debian Debian Linux, published on 25 Nov 2022. 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

Heap based buffer overflow in vim/vim 9.0.0946 and below by allowing an attacker to CTRL-W gf in the expression used in the RHS of the substitute command.

Weakness: CWE-787, CWE-122

Which versions are affected by CVE-2022-4141?

It affects 4 products.

Products include Debian Debian Linux, Fedoraproject Fedora, Neovim Neovim, Vim Vim.

How do I fix CVE-2022-4141?

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-2022-4141 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-4141 exists.

All Debian Debian Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2022-4141, AZL-11504, DEBIAN-CVE-2022-4141, GHSA-w2q9-j8v8-2gf2, MGASA-2022-0464, UBUNTU-CVE-2022-4141.

Is CVE-2022-4141 in your software?

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

Check your SBOMs for free