Zero Day MonitorZDM
DashboardVulnerabilitiesTrendingZero-DaysNewsAbout
Login
ImpressumPrivacy Policy
Zero Day Monitor © 2026
2810 articles · 164731 vulns · 37/41 feeds (7d)
← Back to list
—
CVE-2026-52860EXPLOITEDPATCHED
vim · vim

Vim: Arbitrary Code Execution via Python Omni-Completion

Description

The `dump_prefixes()` function in `src/spell.c` walks a spell-file prefix trie iteratively with a depth counter while dumping the prefixes that apply to a word. The counter is bounded only by the trie structure itself; it is never checked against the size of the fixed `MAXWLEN`-element stack arrays it indexes (`prefix[]`, `arridx[]`, `curi[]`). A crafted `.spl` file, loaded when the user dumps the word list, can drive the descent arbitrarily deep, so the function writes past the end of those arrays. This is a stack out-of-bounds write that corrupts the call frame and crashes the editor. `dump_prefixes()` is called from `spell_dump_compl()` when the word list is dumped, for example on `:spelldump` or via spelling completion. For each node it descends one level with: ```C else { prefix[depth++] = c; arridx[depth] = idxs[n]; curi[depth] = 1; } ``` The arrays have `MAXWLEN` (254) elements, so any `depth` of 254 or more writes out of bounds; a second sink underflows a `size_t` length passed to `vim_strncpy()` once `depth` reaches `MAXWLEN`. In a well-formed file each trie level corresponds to one byte of a prefix, so depth is naturally limited, but the reader does not enforce this for shared subtrees: a `BY_INDEX` shared reference is accepted (its target index is range-checked) and is *not* recursed into. A prefix trie that uses a shared reference to point back to an ancestor or itself therefore parses cleanly while driving the iterative walker past `MAXWLEN`. This is the same class of issue as [GHSA-wgh4-64f7-q3jq]( https://github.com/vim/vim/security/advisories/GHSA-wgh4-64f7-q3jq ) (`tree_count_words()`, fixed in 9.2.0653) in a sibling trie walker that was left unguarded. A spell file is normally inert data, but Vim resolves `spelllang`, `spellfile`, and `runtimepath` to load it, so a repository or archive that ships a malicious `spell/` sidecar can deliver the crafted file. The trigger is user-interaction-gated: spell checking must be enabled and the user must dump the word list. When that happens, the out-of-bounds write corrupts the `dump_prefixes()` stack frame.

Affected Products

VendorProductVersions
vimvim< 9.2.0597, < 9.2.561, < 9.2.597, < 9.2.0653, < 9.2.0662, < 9.2.0663

References

  • https://github.com/vim/vim/security/advisories/GHSA-65p9-mwwx-7468(x_refsource_CONFIRM)
  • https://github.com/vim/vim/security/advisories/GHSA-52mc-rq6p-rc7c(x_refsource_MISC)
  • https://github.com/vim/vim/commit/c8c63673bc4253212820626aeeb75999d9a539d2(x_refsource_MISC)
  • https://github.com/vim/vim/releases/tag/v9.2.0597(x_refsource_MISC)

Related News (5 articles)

Tier C
oss-security1d ago
[vim-security] Vimscript Code Injection in netrw NetrwLocalRmFile() via crafted filename affects Vim < 9.2.0663
→ No new info (linked only)
Tier C
oss-security1d ago
[vim-security] Out-of-bounds Write in Spell File Prefix Dump in Vim < 9.2.0662
→ No new info (linked only)
Tier C
oss-security2d ago
[vim-security] Out-of-bounds Write in Spell File Word Count in Vim < 9.2.0653
→ No new info (linked only)
Tier A
Microsoft MSRC5d ago
CVE-2026-52860 Vim: Arbitrary Code Execution via Python Omni-Completion
→ No new info (linked only)
Tier C
VulDB6d ago
CVE-2026-52860 | vim up to 9.2.596 Command Line exec code injection (GHSA-52mc-rq6p-rc7c)
→ No new info (linked only)
CISA KEV❌ No
Actively exploited✅ Yes
Patch available
9.2.0662
CWECWE-94, CWE-829, CWE-787, CWE-78
PublishedJun 11, 2026
Last enriched1d agov3
Tags
stack overflowspell fileout-of-bounds writecode-injectioncommand-injectionvimscriptnetrw
Trending Score29
Source articles5
Independent3
Info Completeness9/14
Missing: cvss, epss, kev, iocs, mitre_attack

Community Vote

0
Login to vote
0 upvotes0 downvotes
No votes yet

Related CVEs (5)

HIGHCVE-2026-52859EXP
Vim: Out-of-bounds Read in Terminal Screen Snapshot
Trending: 30
NONECVE-2026-47162EXP
Vim: Vimscript Code Injection in netrw NetrwBookHistSave() via crafted directory name
Trending: 25
NONECVE-2026-52858EXP
Vim: Arbitrary Code Execution via Python Omni-Completion
Trending: 25
NONECVE-2026-47167
Vim: Vimscript Code Injection in cucumber filetype plugin via crafted step-definition regex
Trending: 21
MEDIUMPRE-CVE
Out-of-bounds Read in Text Property Count in Vim < 9.2.0670
Trending: 21

Pin to Dashboard

Verification

State: unverified
Confidence: 0%

Vulnerability Timeline

CVE Published
Jun 11, 2026
Discovered by ZDM
Jun 11, 2026
Updated: description, severity, affectedVersions
Jun 11, 2026
Actively Exploited
Jun 12, 2026
Exploit Available
Jun 12, 2026
Patch Available
Jun 12, 2026
Updated: description, severity, affectedVersions, patchAvailable
Jun 16, 2026

Version History

v3
Last enriched 1d ago
v3Tier C1d ago

Updated description with technical details, changed severity to MEDIUM, added affected version < 9.2.0662, and updated patch to 9.2.0662.

descriptionseverityaffectedVersionspatchAvailable
via oss-security
v2Tier C6d ago

Updated description with critical severity and added affected version < 9.2.596.

descriptionseverityaffectedVersions
via VulDB
v16d ago

Initial creation