Skip to main content

Vim CVE-2026-59857

MEDIUM
Out-of-bounds Write (CWE-787)
2026-07-09 GitHub_M
5.6
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Configure Vim with SAL spell file + 8-bit encoding
  2. Delivery
    Open or craft document with MAXWLEN-length word
  3. Exploit
    Trigger sound-based spell suggestion
  4. Execution
    spell_soundfold_sal() writes null byte past stack buffer end
  5. Persist
    eval_soundfold() stack frame corrupted
  6. Impact
    Vim process crash

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Three simultaneous conditions are required: (1) a SAL-based spell file must be loaded and active in Vim - SAL is a specific sound-folding mechanism in spell files, not all spell files use it, making this a non-default configuration; (2) Vim's encoding must be set to a non-multibyte 8-bit encoding such as latin1 or similar, not UTF-8, which is increasingly the default; (3) a word of exactly MAXWLEN characters must be passed to soundfold(), either directly or via sound-based spell suggestion traversal. Active user interaction is required (UI:A per CVSS 4.0) - the user must trigger spell suggestions or open content that does so. These conditions jointly mean default UTF-8 Vim installations are not vulnerable. Exploitation is limited to crashing the editor process; privilege escalation or data exfiltration are not demonstrated impacts.

Impact

The CVSS 4.0 score of 5.6 (Medium) accurately reflects the constrained risk profile: AV:L confirms the attack is local to the editor process, AT:P acknowledges specific prerequisites that limit opportunistic exploitation, and VA:H correctly captures the crash impact. No EPSS data was provided, and the vulnerability is not listed in CISA KEV, indicating no confirmed active exploitation. The impact is DoS only - confidentiality and integrity are explicitly unaffected (VC:N/VI:N). Stack corruption from an off-by-one null write is theoretically exploitable for code execution in highly controlled scenarios, but no published research or POC demonstrates this. The practical risk is therefore an editor crash triggered under a specific, non-default configuration. This is a low-priority remediation item for most organizations unless automated document processing pipelines invoke Vim with SAL spell files under 8-bit encodings - an uncommon but non-zero server-side use case.

Exploit ScenarioDerived

A user opens Vim with a SAL-enabled spell file active (e.g., a language pack using phonetic sound-alike rules) while their encoding is set to a non-multibyte 8-bit value such as latin1, then either manually invokes spell suggestions on a word exactly at the MAXWLEN boundary or opens a crafted document that causes such a word to be processed automatically during spell checking. The off-by-one null write corrupts the eval_soundfold() stack frame, causing Vim to crash. No public proof-of-concept exploit has been identified.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 09, 2026

Stack buffer overflow in Vim's SAL sound-folding spell engine prior to version 9.2.0725 crashes the editor by writing a null byte one position past the end of a MAXWLEN-element stack buffer in spell_soundfold_sal(). Exploitation requires a user to open Vim with a SAL-based spell file active under a non-multibyte 8-bit encoding and trigger sound-based spell suggestions on a boundary-length word, corrupting the eval_soundfold() stack frame. No public exploit has been identified at time of analysis, and the impact is limited to availability (editor crash) with no confidentiality or integrity consequences.

RemediationAI

Upgrade to Vim 9.2.0725 or later, which corrects the off-by-one boundary condition in spell_soundfold_sal(). The fix is confirmed in upstream commit d22ff1c955ff87e8273210eae125aab0e85b6c30; see the advisory at https://github.com/vim/vim/security/advisories/GHSA-m3hf-xcm3-xhm2. As a compensating control, switching the Vim encoding to UTF-8 (set encoding=utf-8) bypasses the vulnerable single-byte branch entirely and eliminates the attack path with no functional loss for most users. Alternatively, disabling SAL-based spell files or refraining from using sound-based spell suggestions (:set nospell or avoiding spell files with SAL entries) prevents the vulnerable function from being called. Note that the encoding workaround may affect display of legacy 8-bit encoded documents.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw lives in the single-byte branch of spell_soundfold_sal() in src/spell.c, which translates words phonetically using SAL (Sound ALike) rules embedded in spell files - the same mechanism used by Hunspell for phonetic suggestion matching. The guard condition is reslen < MAXWLEN rather than reslen <= MAXWLEN - 1, so reslen is permitted to reach exactly MAXWLEN before the null terminator write res[reslen] = NUL executes, placing the byte at index MAXWLEN - one past the last valid element of the MAXWLEN-element stack buffer. This is a textbook off-by-one out-of-bounds write (CWE-787). The vulnerable path is only reachable when Vim is using a non-multibyte 8-bit encoding (e.g., latin1) because the multibyte branch has separate logic. CPE cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:* covers all Vim versions prior to the fix.

Know when Vim gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 5.6 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 4.7 MEDIUM

Local attack vector, high complexity due to required SAL spell file and 8-bit encoding prerequisites, no privileges needed, user must trigger spell suggestions, availability-only impact.

3.1 AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H
4.0 AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 4.7 MEDIUM
AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H
Red Hat 5.5 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Vim is an open source, command line text editor. Prior to 9.2.0725, the single-byte branch of spell_soundfold_sal() in src/spell.c translates a word through a spell file's SAL sound-folding rules into a caller-owned result buffer, but its result writes are guarded with reslen < MAXWLEN, allowing reslen to reach MAXWLEN before res[reslen] = NUL writes one byte past the end of the MAXWLEN-element stack buffer. A boundary-length word passed to soundfold(), or reached via sound-based spell suggestion while a SAL-based spell language is active under a non-multibyte 8-bit encoding, can corrupt the eval_soundfold() stack frame and crash the editor. This issue is fixed in version 9.2.0725.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
High
Vim is preinstalled or widely deployed across Linux, Unix, and developer environments
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

28
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +28
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Affected Products (CPE)CVE.org

cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:*

More in Vim

View all
CVE-2022-3520 CRITICAL POC
9.8 Dec 02

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.0765. Rated critical severity (CVSS 9.8), this vuln

CVE-2022-0729 HIGH POC
8.8 Feb 23

Use of Out-of-range Pointer Offset in GitHub repository vim/vim prior to 8.2.4440. Rated high severity (CVSS 8.8), this

CVE-2026-34714 HIGH POC
8.6 Mar 30

Code execution vulnerability in Vim before 9.2.0272 allows attackers to gain immediate arbitrary command execution upon

CVE-2019-12735 HIGH POC
8.6 Jun 05

getchar.c in Vim before 8.1.1365 and Neovim before 0.3.6 allows remote attackers to execute arbitrary OS commands via th

CVE-2021-3968 HIGH POC
8.0 Nov 19

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 8.0), this vulnerability is remotely exploita

CVE-2022-1616 HIGH POC
7.8 May 07

Use after free in append_command in GitHub repository vim/vim prior to 8.2.4895. Rated high severity (CVSS 7.8), this vu

CVE-2022-1619 HIGH POC
7.8 May 08

Heap-based Buffer Overflow in function cmdline_erase_chars in GitHub repository vim/vim prior to 8.2.4899. Rated high se

CVE-2021-4136 HIGH POC
7.8 Dec 19

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 7.8), this vulnerability is no authentication

CVE-2021-3973 HIGH POC
7.8 Nov 19

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 7.8), this vulnerability is no authentication

CVE-2021-3927 HIGH POC
7.8 Nov 05

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 7.8), this vulnerability is no authentication

CVE-2022-2125 HIGH POC
7.8 Jun 19

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2. Rated high severity (CVSS 7.8), this vulnerability

CVE-2022-2126 HIGH POC
7.8 Jun 19

Out-of-bounds Read in GitHub repository vim/vim prior to 8.2. Rated high severity (CVSS 7.8), this vulnerability is no a

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
Container suse/sl-micro/6.0/baremetal-os-container:2.1.3-6.208 Container suse/sl-micro/6.1/baremetal-os-container:2.2.1-7.138 Affected
Container suse/sl-micro/6.0/toolbox:13.2-9.136 Affected
Container suse/sles/16.0/toolbox:latest Affected
SUSE Linux Enterprise Server 12 SP5-LTSS Fixed
SUSE Linux Enterprise Server LTSS Extended Security 12 SP5 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy