Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain physical device access
-
DeliveryMount or present fragmented FAT volume
-
ExploitTrigger interleaved f_read/f_write on same file object
-
ExecutionUnsigned subtraction wraps in sector comparison
-
PersistDirty cache flush skipped
-
ImpactStale or corrupted data written to persistent storage
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer underflow checks
|
| Exploitation Conditions | Physical access to the target device is required (AV:P per CVSS vector). The vulnerable code path is activated only during interleaved read/write operations on the same FIL (file object) instance, specifically when the filesystem is fragmented such that the sector pointer arithmetic in f_read()/f_write() produces an unsigned underflow in the expression |
| Impact | The CVSS 3.1 vector (AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H, score 6.1 Medium) indicates physical access is required, which substantially limits the realistic threat surface compared to network-exploitable vulnerabilities of similar CVSS score. No privileges are required (PR:N), and complexity is low (AC:L), meaning triggering the bug itself is straightforward once access to the device is obtained. The SSVC assessment raises the operational priority: Technical Impact is rated Total (full control or data destruction possible) and Exploitation is rated PoC - meaning functional proof-of-concept code exists publicly. These SSVC signals suggest that while the attack vector is constrained to physical proximity, the ease of exploitation and severity of impact on embedded devices that trigger this path are genuinely high. EPSS data is not provided. The lack of CISA KEV listing is consistent with the AV:P constraint - mass exploitation is unlikely, but targeted attacks against specific embedded systems (industrial controllers, medical devices, IoT) with local access are plausible. C:N in the CVSS vector means confidentiality is not impacted; the risk is data corruption and system unavailability. |
| Exploit ScenarioDerived | An adversary with physical access to an embedded device (such as an industrial controller or IoT appliance) running firmware that uses FatFs mounts or interacts with a fragmented FAT volume - such as an SD card written across multiple non-contiguous clusters. By triggering a workload that interleaves f_read() and f_write() calls on the same file object across sector boundaries that cause unsigned wrap, the attacker causes the dirty-cache flush to be skipped, leaving inconsistent or attacker-influenced data persisted to disk instead of the correct content. A proof-of-concept demonstrating this condition has been published by runZero. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 01, 2026
Integer underflow in FatFs R0.16 and earlier corrupts filesystem integrity via a stale dirty-cache skip during interleaved read/write operations on fragmented volumes. The condition fp->sect - sect < cc in f_read() and f_write() uses unsigned arithmetic - when sect exceeds fp->sect, the subtraction wraps to a large unsigned value, bypassing the required cache flush and leaving stale or inconsistent data on disk. A proof-of-concept exists per SSVC assessment, and technical impact is rated Total, though physical access is required per the CVSS vector. No confirmed active exploitation (not in CISA KEV).
RemediationAI
No vendor-released patched version has been independently confirmed in the available data - the fix version is not cited in any reference. Upstream research and PoC code are available at https://github.com/runZeroInc/vulns-2026-fatfs-chance, which may contain a proposed fix or patch diff; firmware maintainers should review this repository and apply any available patch to their local FatFs copy before rebuilding. As a compensating control, applications can serialize all read/write access to a given file object to avoid interleaved operations, which eliminates the fragmented-sector code path that triggers the underflow - though this may require application-level locking and adds latency overhead. Restricting FatFs usage to read-only or write-only modes per file object (never mixing both on the same FIL instance) is a second workaround with minimal performance trade-off but requires application refactoring. Firmware owners should monitor https://elm-chan.org/fsw/ff/ for an updated release from ChaN.
Affected VersionsENISA
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 (cpe:2.3:a:chan:fatfs:*:*:*:*:*:*:*:*) is a generic FAT/exFAT filesystem middleware library by ChaN (elm-chan.org), widely embedded in microcontroller projects targeting STM32, AVR, PIC, and similar platforms where it handles SD cards, USB mass storage, and on-chip flash. The vulnerability is rooted in CWE-191 (Integer Underflow): the sector comparison expression fp->sect - sect < cc is evaluated using C unsigned integer arithmetic. When the sector pointer sect is greater than the file's cached sector fp->sect, the subtraction underflows to a very large unsigned number, which satisfies < cc falsely or fails the condition incorrectly, causing the library to skip flushing its dirty sector cache. On fragmented filesystems - where sector numbers for a given file are non-contiguous - this scenario arises naturally during interleaved read/write sequences, meaning normal application workloads on real-world storage media can trigger the bug without adversarial crafting.
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
AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
Physical access required per embedded context; no privileges needed; integrity and availability fully impacted; no confidentiality exposure from cache-skip bug.
Primary rating from Vendor (runZero).
CVSS VectorVendor: runZero
DescriptionCVE.org
FatFs R0.16 and earlier exhibits a stale dirty-cache skip via unsigned-subtraction wrap in f_read() / f_write() (fp->sect - sect < cc) during interleaved read/write on fragmented filesystems. This maps to CWE-191 (Integer Underflow). Estimated CVSS v3.1 vector: CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H (6.1, Medium). The estimated CISA SSVC vectors are Exploitation: PoC, Technical Impact: Total.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Stack-based buffer overflow in FatFs R0.16 and earlier allows an attacker who can present crafted exFAT media to corrupt
Buffer overflow in FatFs R0.16 and earlier arises when long filenames (up to 255 characters, enabled via FF_USE_LFN) ret
Integer overflow in ELM-Chan FatFS R0.16 and earlier lets a crafted FAT32 volume corrupt file-size metadata during mount
Unbounded mount-time loop in FatFs prior to R0.16 allows physical attackers to cause a denial of service by presenting a
Divide-by-zero in FatFs R0.16 and earlier's exFAT sync logic crashes the filesystem when crafted volume metadata causes
Uninitialized cluster exposure in FatFs R0.16 and earlier allows recovery of residual disk data when f_lseek() extends a
EUVD-2026-40996
GHSA-rggj-rv54-4gvx
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB