Skip to main content

FatFs EUVDEUVD-2026-40994

| CVE-2026-6684 MEDIUM
Loop with Unreachable Exit Condition (Infinite Loop) (CWE-835)
2026-07-01 runZero GHSA-vhc7-qgwj-vx6v
4.6
CVSS 3.1 · Vendor: runZero
View

Attack ChainAIDerived

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

  1. Access
    Obtain physical device access
  2. Delivery
    Insert crafted GPT disk image with inflated GPTH_PtNum
  3. Exploit
    FatFs reads unbounded partition count from GPT header
  4. Execution
    Mount loop iterates indefinitely
  5. Impact
    Device availability permanently disrupted until reboot

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Loop termination conditions
MITRE ATT&CK

1 technique across 1 tactic: Impact

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

Exploitation Conditions

Exploitation requires physical access to the target device (AV:P) sufficient to insert removable storage media such as an SD card or USB drive. Additionally, the deployed FatFs build must have been compiled with FF_LBA64 = 1 - a non-default, opt-in configuration flag enabling 64-bit LBA and GPT disk support; FatFs builds without this flag do not process GPT headers and are not vulnerable. No authentication or elevated privilege is required from the attacker (PR:N), and no user interaction beyond the physical insertion is needed (UI:N). Exploitation is hard-limited by the physical access requirement, the specific compile-time flag dependency, and the fact that impact is purely a mount-time denial of service with no code execution, privilege escalation, or data exposure possible. Devices where removable media ports are physically locked or firmware-disabled are not exploitable.

Impact

The CVSS physical attack vector (AV:P) is the dominant risk-limiting factor: an attacker must physically insert crafted removable media - an SD card, USB storage device, or similar - into the target device to trigger the flaw. This eliminates all remote and network-based attack paths and makes mass exploitation essentially infeasible. The CVSS score of 4.6 Medium accurately reflects this constraint. Impact is confined entirely to availability (A:H); confidentiality and integrity are unaffected (C:N/I:N), so there is no data exfiltration or code execution risk. SSVC signals PoC-level exploitation and Partial technical impact, consistent with a targeted DoS with no lateral movement potential. EPSS data was not provided in the input; numerical exploitation probability cannot be assessed. The combination of physical access requirement, compile-time configuration dependency (FF_LBA64 = 1), and pure availability impact means this is low priority for most software environments but elevated for industrial control systems, kiosks, or embedded devices where untrusted physical access is plausible and uptime is safety- or mission-critical. No CISA KEV listing confirms no known active exploitation at time of analysis.

Exploit ScenarioDerived

An attacker with physical access to an embedded device - such as an industrial controller or kiosk - inserts a crafted SD card containing a GPT disk image where GPTH_PtNum is set to 0xFFFFFFFF. When the device attempts to automount the media, FatFs compiled with FF_LBA64 = 1 enters an effectively infinite partition-scanning loop, permanently hanging the mount thread and rendering the device unavailable until power-cycled. A public proof-of-concept demonstrating this behavior is available at https://github.com/runZeroInc/vulns-2026-fatfs-chance.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jul 01, 2026

Unbounded mount-time loop in FatFs prior to R0.16 allows physical attackers to cause a denial of service by presenting a crafted GPT disk image with an arbitrarily large GPTH_PtNum partition count field. The flaw is present only in builds where the FF_LBA64 = 1 compile-time flag is set, enabling 64-bit LBA and GPT scanning support. A public proof-of-concept is available from runZero; no confirmed active exploitation (CISA KEV) has been observed, and SSVC categorizes technical impact as partial, limited to availability.

RemediationAI

Upgrade FatFs to R0.16 or later, which is the vendor-designated patched release resolving the unbounded GPTH_PtNum loop; source is available at https://elm-chan.org/fsw/ff/. If upgrading is not immediately feasible in firmware-constrained environments, the most effective mitigation is to recompile FatFs with FF_LBA64 = 0 or omit GPT scanning entirely if the application does not require support for GPT-partitioned media larger than 2 TB - this removes the vulnerable code path with no functional impact for devices using MBR-formatted media. Alternatively, integrating an application-layer validation wrapper that bounds GPTH_PtNum to a sane maximum (e.g., 128 or 256 partition entries) before invoking FatFs mount routines eliminates the unbounded loop without a library upgrade; the trade-off is that this requires careful code review to ensure the wrapper is always invoked and cannot be bypassed. Physical security controls - locking or disabling external media ports via hardware or firmware policy - remove the attack surface for deployed devices where GPT media insertion by untrusted parties is the threat model.

Affected VersionsENISA

FatFs 0 <R0.16

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

FatFs (elm-chan FatFs) is a lightweight, open-source FAT/exFAT filesystem library written in C and widely embedded in microcontrollers, RTOS environments, and bare-metal systems. When compiled with the FF_LBA64 = 1 configuration flag - which unlocks 64-bit Logical Block Addressing and GUID Partition Table (GPT) support for large storage devices - the library parses the GPT header field GPTH_PtNum to determine how many partition entries to iterate over during mount. CWE-835 (Loop with Unreachable Exit Condition) applies because FatFs uses this attacker-controlled integer directly as the loop iteration bound without imposing a sane upper limit or sanity-checking it against the actual disk geometry. Presenting a GPT header with GPTH_PtNum set to a maximum or near-maximum value causes the scan loop to run for an effectively infinite number of cycles, stalling or permanently blocking the mount operation. The CPE identifier is cpe:2.3:a:chan:fatfs:*:*:*:*:*:*:*:*.

Know when Fatfs 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 (runZero) PRIMARY 4.6 MEDIUM
AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 4.6 MEDIUM

Physical media insertion is required (AV:P); no privileges or user interaction needed; only availability is impacted (A:H) via mount-time hang with no data exposure.

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

Primary rating from Vendor (runZero).

CVSS VectorVendor: runZero

Attack Vector
Physical
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

DescriptionCVE.org

FatFs prior to R0.16 that use GPT scanning with 'FF_LBA64 = 1' contains an issue where an unbounded loop count derived from GPT header field GPTH_PtNum, enabling extremely long or effectively infinite mount-time scans. This maps to CWE-835 (Loop with Unreachable Exit Condition). Estimated CVSS v3.1 vector: CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (4.6, Medium). The estimated CISA SSVC vectors are Exploitation: PoC, Technical Impact: Partial.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
Medium
widely used embedded FAT filesystem library across microcontroller and RTOS projects
Data Quality
6 sources
Confidence: High

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.2%
Patch available No
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
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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