VYPR
Unrated severityNVD Advisory· Published Dec 5, 2022· Updated Apr 14, 2025

Use After Free in vim/vim

CVE-2022-4292

Description

Use-after-free in Vim's spell checking when a SpellFileMissing autocommand closes the window, fixed in 9.0.0882.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Use-after-free in Vim's spell checking when a SpellFileMissing autocommand closes the window, fixed in 9.0.0882.

Vulnerability

A use-after-free vulnerability exists in Vim prior to version 9.0.0882 in the did_set_spelllang function. When a SpellFileMissing autocommand is triggered during spell loading, it may destroy the buffer or close the window, leading to use of freed memory. The flaw affects all Vim versions before the patch. [1]

Exploitation

An attacker must craft a file that triggers the SpellFileMissing autocommand, which can close the window or delete the buffer while Vim is still referencing it. The attacker needs the ability to execute autocommands, typically by opening a specially crafted file or through user interaction. The race condition is avoided by the patch that adds a window validity check. [1]

Impact

Successful exploitation could lead to a use-after-free condition, resulting in crashes or potential arbitrary code execution depending on the memory state. The impact is high due to the possibility of code execution in the context of Vim. [1]

Mitigation

The vulnerability is fixed in Vim version 9.0.0882, released on November 28, 2022. Users should upgrade to at least this version. Gentoo recommends upgrading to 9.0.1157 as part of a broader security update. [1][3]

AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

38

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

5

News mentions

0

No linked articles in our index yet.