All reports
Low

vim: invalid memory access in substitute with function

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2022-4141

Probability of exploitation in the next 30 days: 0.47%

FIRST EPSS · 2026-11-24

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.

A heap-based buffer overflow vulnerability was found in Vim due to invalid memory access. This issue could allow an attacker to trick a user into opening a specially crafted file, triggering an out-of-bounds write that causes an application to crash, possibly executing code and corrupting memory.