Cloudanix VulnDB

CVE-2026-57454

Medium · 6.1

CVSS

6.1

EPSS

0.2%

Published

Jun 25, 2026

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A malicious editor recovery file can make vulnerable versions of Vim crash and may expose small amounts of data from memory when someone opens it.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Denial Of Service
Component
Application
Class
Information Disclosure
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Vim versions from 9.2.0320 before 9.2.0679 can mishandle crafted undo or swap files containing malformed virtual-text properties. When Vim restores or displays affected line data, it converts an attacker-controlled offset into a pointer and reads virtual text without adequate bounds checking. This results in an out-of-bounds heap read, which can crash Vim and may disclose adjacent process memory. The vulnerability requires local file interaction and user action, such as opening or recovering a crafted file, but does not require attacker authentication.

Why it matters to the business

An attacker who can convince a user or automated workflow to open or recover a malicious Vim undo or swap file could disrupt editing sessions or potentially expose sensitive data present in Vim process memory. The most likely operational impact is denial of service through editor crashes; the confidentiality impact is lower but relevant where Vim is used to edit secrets, configuration files, source code, credentials, or production artifacts. This issue is not listed in CISA KEV, has low EPSS, and has no reported exploit maturity, so it is lower urgency than actively exploited remote vulnerabilities, but it should still be remediated through standard endpoint and developer-tool patch cycles.

How an attack unfolds

An attacker prepares a malicious Vim undo or swap file with a virtual-text property whose stored offset and length reference memory outside the valid property data for a line. The attacker then needs that file to be opened, restored, or recovered by a vulnerable Vim version, typically by placing it alongside a file the victim edits, sending it as part of an archive or project directory, or abusing a workflow that automatically invokes Vim recovery. When the victim opens Vim and the editor processes the crafted undo or swap metadata, Vim calculates a pointer from the malformed offset and reads beyond the intended buffer. Depending on heap layout and runtime conditions, this can terminate Vim or expose adjacent memory contents through editor output, diagnostics, crash artifacts, or other observable behavior.

How to fix it

Upgrade Vim to version 9.2.0679 or later. Where distribution packages backport fixes without changing the upstream version string, apply the vendor-provided security update and verify that the package changelog includes the fix for this issue. If immediate patching is not possible, reduce exposure by disabling or restricting use of untrusted Vim swap and undo files, avoiding recovery of files from untrusted directories, deleting unexpected .swp/.swo/.swn and undo files before opening content, and opening untrusted project archives in isolated disposable environments. Treat editor state files received from external sources as untrusted content.

How to confirm the fix worked

Confirm installed Vim versions are not in the affected range from 9.2.0320 through 9.2.0678, or that the operating system vendor has backported the fix. Run `vim --version` and compare against the fixed upstream version 9.2.0679 or later. On managed endpoints and build images, inventory installed Vim packages using the platform package manager and confirm the applied package includes the security patch. Validate exposure controls by checking whether users or automated jobs recover Vim swap files or preserve undo files from untrusted project directories. If testing in a lab, opening a known crafted proof-of-concept file should no longer crash Vim or cause abnormal memory access under AddressSanitizer, valgrind, or equivalent tooling.

Typical attack path

  1. Identify a target likely to use vulnerable Vim versions between 9.2.0320 and before 9.2.0679.
  2. Create a crafted undo or swap file containing malformed virtual-text property metadata with out-of-bounds offset and length values.
  3. Deliver the crafted file through a project archive, shared repository, temporary working directory, email attachment, or other local file-transfer path.
  4. Induce the user or process to open, edit, restore, or recover the associated file using vulnerable Vim.
  5. Vim parses the malicious undo or swap metadata and performs an unchecked out-of-bounds heap read.
  6. The attacker gains a denial-of-service effect through a crash and may obtain adjacent memory disclosure if leaked data is surfaced or captured.

How to detect it

Look for evidence that vulnerable Vim instances opened or recovered suspicious swap or undo files and then crashed. Useful sources include endpoint detection telemetry, process execution logs, shell history, terminal audit logs, package inventory, crash reporters, core dump directories, syslog, journald, macOS Console logs, Linux auditd, and EDR file-event telemetry. Search for Vim executions involving recovery flags, swap files, undo files, or files opened from recently extracted archives, downloads, email attachments, shared folders, or cloned repositories. Investigate abnormal Vim process exits, segmentation faults, bus errors, core dumps, and crash reports occurring shortly after access to .swp, .swo, .swn, or Vim undo files. For suspected exploitation, preserve the associated edited file, swap file, undo file, shell history, crash dump, and process telemetry; analyze whether the state file contains malformed virtual-text property metadata. There are no widely reported public exploitation campaigns or named threat actors for this issue, so detection should focus on local crash-and-file artifacts rather than known attacker infrastructure.

  • vim -r
  • vim -L
  • E325: ATTENTION
  • Found a swap file by the name
  • .swp
  • .swo
  • .swn
  • .un~
  • .vim/undo/
  • Segmentation fault.*vim
  • segfault.*vim
  • vim.*core dumped
  • core.vim
  • AddressSanitizer.*heap-buffer-overflow.*vim
  • AddressSanitizer.*out-of-bounds.*vim
  • valgrind.*Invalid read.*vim

What your security team should do

  • Patch Vim to 9.2.0679 or later across developer workstations, administrative hosts, CI images, containers, and servers where Vim is installed.
  • Prioritize systems where Vim is used to edit secrets, credentials, source code, infrastructure-as-code, or production configuration files.
  • Inventory and remove unexpected Vim swap and undo files from shared directories, repositories, extracted archives, and temporary working areas when they originate from untrusted sources.
  • Educate users not to recover Vim swap files from unknown projects or archives and to treat editor state files as potentially malicious.
  • For high-risk workflows, open externally supplied code or text archives in sandboxed environments or disposable containers.
  • Monitor for repeated Vim crashes or abnormal terminations after opening or recovering files, especially following receipt of external archives or repository content.
  • Because the issue is not currently KEV-listed and has low EPSS, handle it through normal vulnerability remediation SLAs unless local threat modeling elevates risk.

The record

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.

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities