Heap-based Buffer Overflow in vim/vim
Description
A heap-based buffer overflow in Vim's compile_redir function allows reading past the end of a line.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A heap-based buffer overflow in Vim's compile_redir function allows reading past the end of a line.
Vulnerability
A heap-based buffer overflow exists in the compile_redir function of Vim prior to version 9.0.0742 [1]. The vulnerability occurs when handling :redir END commands during function compilation. Specifically, the code did not properly skip compilation when cctx->ctx_skip was set to SKIP_YES, leading to out-of-bounds reads [1].
Exploitation
An attacker can trigger the vulnerability by providing a crafted Vim script that includes a :redir block with an END directive under conditions where ctx_skip indicates the block should be skipped [1]. This requires the victim to open the malicious file in Vim or otherwise execute the crafted script [3]. No special authentication or network access is typically needed, as Vim is commonly used to edit files locally.
Impact
Successful exploitation leads to a heap-based buffer overflow, which may result in reading past the end of the line [1]. This can cause undefined behavior, including denial of service, memory corruption, or potentially arbitrary code execution depending on the heap layout and system protections [2].
Mitigation
The vulnerability is fixed in Vim version 9.0.0742, released on 2022-08-29 [1]. Users should upgrade to at least this version. Gentoo provides an updated package >=app-editors/vim-9.0.1157 [2]. No known workaround exists for unpatched versions [2].
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- osv-coords36 versionspkg:rpm/opensuse/vim&distro=openSUSE%20Leap%2015.3pkg:rpm/opensuse/vim&distro=openSUSE%20Leap%2015.4pkg:rpm/opensuse/vim&distro=openSUSE%20Leap%20Micro%205.2pkg:rpm/opensuse/vim&distro=openSUSE%20Leap%20Micro%205.3pkg:rpm/suse/vim&distro=SUSE%20Enterprise%20Storage%206pkg:rpm/suse/vim&distro=SUSE%20Enterprise%20Storage%207pkg:rpm/suse/vim&distro=SUSE%20Enterprise%20Storage%207.1pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-LTSSpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-LTSSpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-ESPOSpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSSpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Micro%205.1pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Micro%205.2pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Micro%205.3pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP4pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Desktop%20Applications%2015%20SP4pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Real%20Time%2015%20SP3pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCLpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4-LTSSpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-LTSSpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-LTSSpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSSpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP4pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP1pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP2pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3pkg:rpm/suse/vim&distro=SUSE%20Manager%20Proxy%204.1pkg:rpm/suse/vim&distro=SUSE%20Manager%20Proxy%204.2pkg:rpm/suse/vim&distro=SUSE%20Manager%20Retail%20Branch%20Server%204.1pkg:rpm/suse/vim&distro=SUSE%20Manager%20Retail%20Branch%20Server%204.2pkg:rpm/suse/vim&distro=SUSE%20Manager%20Server%204.1pkg:rpm/suse/vim&distro=SUSE%20Manager%20Server%204.2pkg:rpm/suse/vim&distro=SUSE%20OpenStack%20Cloud%209pkg:rpm/suse/vim&distro=SUSE%20OpenStack%20Cloud%20Crowbar%209
< 9.0.1040-150000.5.31.1+ 35 more
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1234-17.12.1
- (no CPE)range: < 9.0.1234-17.12.1
- (no CPE)range: < 9.0.1234-17.12.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1234-17.12.1
- (no CPE)range: < 9.0.1234-17.12.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1040-150000.5.31.1
- (no CPE)range: < 9.0.1234-17.12.1
- (no CPE)range: < 9.0.1234-17.12.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
3News mentions
0No linked articles in our index yet.