Skip to main content

vifm CVE-2026-8997

| EUVDEUVD-2026-31439 MEDIUM
Heap-based Buffer Overflow (CWE-122)
2026-05-22 CERT-PL GHSA-3623-vc46-pwpv
4.8
CVSS 4.0 · Vendor: CERT-PL
View

Attack ChainAIDerived

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

  1. Access
    Place crafted vifminfo.json with oversized history entry
  2. Delivery
    Victim launches vifm
  3. Exploit
    Trie merge reads oversized key
  4. Execution
    Heap buffer allocated at fixed size
  5. Persist
    Key written past buffer boundary
  6. Impact
    Memory corruption or application crash

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

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

Exploitation Conditions

Exploitation requires the victim to launch vifm while a history entry exceeding PATH_MAX*2 bytes (typically 8192 bytes) is present in vifminfo.json. This can arise from a crafted state file placed in the user's vifm configuration directory, or from a legitimately long filesystem path or command that was previously recorded in history. The binary must be a release build (NDEBUG set) - debug builds retain the assert guard. UI:P in the CVSS 4.0 vector confirms that the victim must perform the action of opening vifm (passive user interaction). Exploitation is limited to the local system; no network vector exists. Impact is constrained to application availability (crash); the CVSS C:N/I:N metrics indicate no confidentiality or integrity compromise is confirmed.

Impact

Real-world risk is low. The CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P/VA:L) confirms local attack vector with only low availability impact - an application crash, not code execution. EPSS at 0.02% (4th percentile) reflects the extremely low probability of active exploitation. SSVC assessment aligns: Exploitation: none, Automatable: no, Technical Impact: partial. No CVE entry in CISA KEV and no public POC. While the description notes 'memory corruption' as a potential outcome, the CVSS impact metrics (C:N/I:N) do not support a code execution scenario in practice, and the fix is a straightforward allocation size correction rather than a complex logic change - further evidence the exploitable surface for anything beyond a crash is minimal. This vulnerability is correctly scoped as a low-severity local denial-of-service affecting a niche application, relevant primarily to organizations running vifm in scripted or automated workflows where stability matters.

Exploit ScenarioDerived

An attacker with the ability to write or influence a user's vifminfo.json state file (for example, via a shared filesystem, symlink attack, or social engineering to visit a crafted directory path) could insert history entries exceeding PATH_MAX*2 characters. When the victim next launches vifm, the trie merge process overflows the heap buffer, crashing the application. No public exploit code exists at time of analysis.

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

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

Alert me

AnalysisAIv1 – Jul 23, 2026

Heap buffer overflow in vifm's trie implementation exposes versions 0.12.1 through 0.14.3 to memory corruption or application crash when processing history entries that exceed PATH_MAX*2 bytes during state file (vifminfo.json) load and merge. The root cause is a missing runtime length check in release builds - a guard assert existed only in debug builds, leaving production binaries unprotected against oversized keys in the trie string storage. Exploitation yields at most application availability impact (crash); no public exploit code exists and CISA has not added this to the KEV catalog, with EPSS at 0.02%.

RemediationAI

The upstream fix is available in commit 23063c741f15a85621fd232dfc3ac5b779f6910d at https://github.com/vifm/vifm/commit/23063c741f15a85621fd232dfc3ac5b779f6910d; this changes trie string buffer allocation to use MAX(MIN_STR_BUF_SIZE, len) so buffers always accommodate the actual key length rather than a fixed cap. A formally tagged release containing this fix has not been independently confirmed from the available data - users should build from a commit at or after 23063c7 until an official release is published. As a compensating control where building from source is not feasible, administrators can restrict write access to vifminfo.json or use filesystem controls to prevent untrusted content from entering the file, though this does not address locally-triggered history entries from long paths. Users who do not rely on vifm's history merge functionality can consider disabling history persistence via vifm configuration, accepting the trade-off of lost command history across sessions.

Affected VersionsENISA

vifm 0.12.1 ≤0.14.3

Affected Packages

euvd vifm no fix

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

vifm is a terminal-based vi-like file manager written in C. It uses an internal trie data structure (src/utils/trie.c) to store and merge history entries from its state file (vifminfo.json). Each trie node's string storage was allocated in fixed-size buffers defined as STR_BUF_SIZE = PATH_MAX*2 (typically 8192 bytes on Linux). An assert statement validated that inserted keys did not exceed this limit, but assert() is a no-op in release builds compiled with NDEBUG, meaning the length guard was entirely absent in shipped binaries. When a key longer than STR_BUF_SIZE was inserted - either via a crafted state file or via a genuinely long filesystem path or command in history - malloc() allocated only STR_BUF_SIZE bytes while the subsequent memcpy wrote the full key length, causing a heap buffer overflow (CWE-122). The affected CPE is cpe:2.3:a:vifm:vifm:*:*:*:*:*:*:*:* for versions 0.12.1 through 0.14.3. Discovered by Michał Majchrowicz and Marcin Wyczechowski of CERT-PL.

Know when Vifm 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 (CERT-PL) PRIMARY 4.8 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 3.3 LOW

Local vector (state file on disk), no privileges needed to create long history entries, user interaction required to launch vifm, availability-only impact per provided CVSS 4.0 impact metrics.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (CERT-PL).

CVSS VectorVendor: CERT-PL

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

DescriptionCVE.org

vifm is vulnerable to a heap buffer overflow during the history merge process when saving the state file (vifminfo.json). This flaw occurs because the application lacks a runtime check on the length of history entries in release builds, potentially allowing a crafted long path or command in the history to cause memory corruption or application crashes. Releases from 0.12.1 to 0.14.3 (including) are considered vulnerable. This issue was fixed in commit 23063c7

Threat Intelligence Overview

EPSS Score
0.0%
Top 96% exploitable
Prevalence
Rare
niche terminal vi-like file manager, minimal enterprise footprint
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment 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.0%
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
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.

Vendor StatusVendor

SUSE

Product Status
openSUSE Tumbleweed Fixed

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