Skip to main content

Vim CVE-2026-57454

| EUVDEUVD-2026-39441 MEDIUM
Out-of-bounds Read (CWE-125)
2026-06-25 GitHub_M
6.8
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Recon
    Craft textprop_T blob with out-of-range tp_text_offset
  2. Delivery
    Embed in .un~ undo or swap file
  3. Exploit
    Deliver file to target directory
  4. Install
    Victim opens associated file in Vim
  5. C2
    Vim restores undo history, dereferences crafted offset
  6. Execute
    OOB heap read
  7. Impact
    Crash (VA:H) or adjacent heap disclosure (VC:L)

Vulnerability Assessment

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

1 technique across 1 tactic: Collection

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

Exploitation Conditions

Exploitation requires all of the following: (1) the target system runs Vim 9.2.0320-9.2.0678 compiled with the persistent_undo feature - standard in major distribution builds, confirmed by the test's CheckFeature persistent_undo guard; (2) a crafted undo file (.FILENAME.un~) or swap file is present on the filesystem at the path Vim will automatically probe when opening the associated base file; (3) the user actively opens that base file in Vim, triggering undo history restoration via um_goto_line() or virtual-text rendering via get_text_props(). Exploitation is limited by: local attack vector only (no network path exists); required active user interaction (the user must open the file); the crafted file must land at the exact undo/swap path Vim expects (not arbitrary filesystem write). The attack does not require any authentication or elevated privileges beyond write access to a directory the victim will open files from.

Impact

The CVSS 4.0 score of 6.8 accurately characterizes a moderate but not critical real-world risk. The local attack vector (AV:L) and required active user interaction (UI:A) are the principal mitigating factors - exploitation demands that an attacker place a crafted undo or swap file on the target filesystem AND induce the user to open the associated file in Vim. Neither a CISA KEV listing nor a confirmed third-party proof-of-concept was present in the provided intelligence, keeping urgency below patch-immediately thresholds. However, the fix commit's test functions (Test_textprop_undo_bad_vtext_offset and the revised ManipulateUndoBlob helper) supply a byte-for-byte construction guide for a malicious undo blob, meaning the gap to a functional exploit is narrow. The VA:H signal (high availability impact - crash) is confirmed by the commit's assertion that the pre-fix code causes an ASan abort. The VC:L (low confidentiality) signal reflects real risk: heap regions adjacent to the property buffer can hold credentials, editor buffers, or file contents. EPSS data was not included in the provided intelligence; exploitation probability cannot be quantitatively assessed from available signals.

Exploit ScenarioDerived

An attacker embeds a crafted .FILENAME.un~ undo file alongside a legitimate file in a shared repository or archive download; the undo blob contains a single textprop_T entry with tp_id set to -1 (virtual text) and tp_text_offset set to 0x00100000 - far beyond the 34-byte property data. When a developer checks out the repository and opens the file in a vulnerable Vim, Vim automatically loads the undo file, restores the crafted line via um_goto_line(), and dereferences the out-of-range offset as a heap pointer, reading up to tp_len bytes of adjacent heap content (potentially exposing in-memory buffer contents or credentials) or crashing the editor. The fix commit's ManipulateUndoBlob test function provides byte-exact construction details, significantly reducing attacker skill requirements.

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 – Jun 25, 2026

Out-of-bounds heap read in Vim 9.2.0320-9.2.0678 allows a crafted undo or swap file to disclose adjacent heap memory or crash the editor when a victim opens it. The flaw resides in the text property (textprop) subsystem: a maliciously encoded virtual-text property with an oversized tp_text_offset is converted directly to a heap pointer without bounds validation in both the undo-restoration path (um_goto_line) and the display path (get_text_props). The CVSS 4.0 score of 6.8 (Medium) reflects local-only exploitation requiring active user interaction; no public exploit is confirmed at time of analysis, though the fix commit includes detailed test scaffolding constituting a near-complete attack blueprint.

RemediationAI

Vendor-released patch: Vim 9.2.0679, available at https://github.com/vim/vim/releases/tag/v9.2.0679; the underlying fix commit is https://github.com/vim/vim/commit/b3faeecc976d3031d7c0675623516ec60c30f949. Users should upgrade through their distribution package manager (apt upgrade vim, dnf upgrade vim, brew upgrade vim, etc.) or build from source at the tagged release. If immediate upgrade is not possible, two targeted compensating controls reduce exposure: first, disable persistent undo by adding set noundofile to ~/.vimrc - this prevents Vim from writing or reading .un~ undo files entirely, directly blocking the primary attack path (trade-off: loss of cross-session undo history); second, suppress swap file loading with set noswapfile or launch Vim with vim -n, preventing the swap-restore path from being reached (trade-off: no crash recovery for interrupted sessions). Neither workaround patches the root cause; they only prevent the vulnerable code path from executing with attacker-controlled input. Avoid opening files in affected Vim versions when the associated undo or swap file originates from an untrusted source (shared repositories, downloaded archives, email attachments).

Affected VersionsENISA

vim 9.2.0320, < 9.2.0679

Affected Packages

euvd vim_9_2_0320 fix: 9.2.0679

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

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

Technical ContextAI · show details

Vim's text property feature (textprop) persists per-line annotations - including virtual text rendered beside a line - in undo and swap files as serialized textprop_T structures. Each structure contains a u.tp_text_offset field indicating where the virtual-text string begins within the trailing property-data blob. In affected versions, um_goto_line() (undo restore, src/textprop.c) and get_text_props() (display) converted this offset to a pointer and read tp_len bytes without first verifying that offset + len + 1 ≤ propdata_len. Virtual-text properties are identified by a negative tp_id value; the pre-patch code iterated all such properties without any range check. The fix introduces text_prop_vtext_valid() - a new validation function added to src/textprop.c - that iterates every property with tp_id < 0 and rejects any whose tp_text_offset or tp_len overflows the property data region, emitting error E967 and nulling the buffer. CWE-125 (Out-of-bounds Read) is the root cause: the attacker-controlled offset drives a read beyond the allocated heap region, exposing adjacent heap content or triggering a crash.

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 6.8 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 6.1 MEDIUM

Local vector because exploitation requires a crafted file on the local filesystem; user interaction required to open the file; no integrity impact; low confidentiality from bounded heap read; high availability from crash.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

1
Patch available
Jun 25, 2026 - 17:02 EUVD

DescriptionCVE.org

Vim is an open source, command line text editor. From 9.2.0320 until 9.2.0679, a crafted undo or swap file can store a virtual-text property whose offset and length point outside the line's property data. When Vim restores or displays such a line it converts the offset into a pointer and reads the virtual text without bounds checking, causing an out-of-bounds read that can crash Vim or disclose adjacent heap memory. This vulnerability is fixed in 9.2.0679.

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Prevalence
High
default text editor on most Linux and macOS systems
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor 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

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
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.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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
SLES15-SP5-CHOST-BYOS-SAP-CCloud Affected
SLES15-SP6-CHOST-BYOS Affected
SLES15-SP6-CHOST-BYOS-Aliyun Affected
SLES15-SP6-CHOST-BYOS-Azure Affected
SLES15-SP6-CHOST-BYOS-EC2 Affected

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