Use of Out-of-range Pointer Offset in vim/vim
Description
Use of out-of-range pointer offset in vim's fuzzy matching allows memory corruption, fixed in version 9.0.1499.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Use of out-of-range pointer offset in vim's fuzzy matching allows memory corruption, fixed in version 9.0.1499.
Vulnerability
A use of out-of-range pointer offset exists in the fuzzy matching functionality of vim prior to version 9.0.1499. The flaw resides in the fuzzy_match_recursive and vgr_match_buylines functions, where improper bounds checking can lead to accessing memory outside the intended buffer, especially when a long search pattern is provided [3].
Exploitation
To exploit this vulnerability, an attacker would need to trick a user into opening a file or editing text that triggers a fuzzy match with an excessively long pattern. The attacker does not require authentication but relies on user interaction. Once triggered, the out-of-bounds access can cause undefined behavior.
Impact
Successful exploitation can lead to memory corruption, potentially resulting in denial of service or arbitrary code execution with the privileges of the user running vim. The exact impact depends on the system configuration and memory layout.
Mitigation
The issue is fixed in vim version 9.0.1499, which includes patches to properly bound the pattern length and clear structures before use [3]. Users should update to this version or later. No workaround is available if upgrading is not possible.
AI Insight generated on May 26, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
33- osv-coords31 versionspkg:rpm/opensuse/vim&distro=openSUSE%20Leap%2015.4pkg:rpm/opensuse/vim&distro=openSUSE%20Leap%2015.5pkg:rpm/opensuse/vim&distro=openSUSE%20Leap%20Micro%205.3pkg:rpm/opensuse/vim&distro=openSUSE%20Leap%20Micro%205.4pkg:rpm/opensuse/vim&distro=openSUSE%20Tumbleweedpkg: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%20Micro%205.4pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP4pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP5pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Desktop%20Applications%2015%20SP4pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Desktop%20Applications%2015%20SP5pkg: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%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%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.2pkg:rpm/suse/vim&distro=SUSE%20Manager%20Server%204.2
< 9.0.1572-150000.5.46.1+ 30 more
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1632-150500.20.3.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1504-1.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1632-150500.20.3.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1632-150500.20.3.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-17.18.1
- (no CPE)range: < 9.0.1572-17.18.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-17.18.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
- (no CPE)range: < 9.0.1572-150000.5.46.1
Patches
0No patches discovered yet.
Vulnerability mechanics
Root cause
"The fuzzy matching logic in Vim can use uninitialized memory when the pattern length exceeds a defined maximum."
Attack vector
An attacker can trigger this vulnerability by providing a specially crafted pattern to the fuzzy matching functionality within Vim. This could occur when Vim is used in an environment where user-supplied patterns are processed, such as through scripting or specific commands. The vulnerability is triggered when the pattern length exceeds `MAX_FUZZY_MATCHES` [ref_id=1].
Affected code
The vulnerability exists in the `vgr_match_buflines` function within the `vim/vim` repository. Specifically, the issue arises in the fuzzy string matching part of this function, which calls `fuzzy_match` [ref_id=1]. The related `fuzzy_match_recursive` function also had changes to initialize its `recursiveMatches` array.
What the fix does
The patch introduces a check to limit the `pat_len` variable to `MAX_FUZZY_MATCHES` before it is used in the fuzzy matching logic [ref_id=1]. This prevents the fuzzy matching function from accessing uninitialized memory by ensuring that the pattern length does not exceed the allocated buffer size for matches. Additionally, `CLEAR_FIELD` is used to initialize the `matches` array, further mitigating the risk of using uninitialized data.
Generated on Jun 6, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LOJP6M7ZTKZQYOGVOOAY6TIE6ACBJL55/mitrevendor-advisory
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PCLJN4QINITA3ZASKLEJ64C5TFNKELMO/mitrevendor-advisory
- github.com/vim/vim/commit/caf642c25de526229264cab9425e7c9979f3509bmitre
- huntr.dev/bounties/3451be4c-91c8-4d08-926b-cbff7396f425mitre
- support.apple.com/kb/HT213844mitre
- support.apple.com/kb/HT213845mitre
News mentions
0No linked articles in our index yet.