FatFs: Stack-based Buffer Overflow
CVE-2026-6687 is a high-severity stack-based buffer overflow vulnerability in FatFs from ChaN, with a CVSS 3.1 base score of 7.6 out of 10. It can be exploited with physical access to the device by an unauthenticated attacker, without any action from a user. Affected FatFs versions: R0.16 and earlier. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.35% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of FatFs you run against the affected versions below, and install the vendor's latest release.
Affected products and versions
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- PhysicalThe attacker must physically touch the device.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- ChangedThe attack can reach beyond the vulnerable component into other systems.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H. Scored by CNA.
Official description
FatFs R0.16 and earlier contains a stack overflow bug in f_getlabel() because exFAT label length (XDIR_NumLabel) is trusted without enforcing spec maximums. This maps to CWE-121 (Stack-based Buffer Overflow). Estimated CVSS v3.1 vector: CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H (7.6, High). The estimated CISA SSVC vectors are Exploitation: PoC, Technical Impact: Total.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Stack-based Buffer Overflow
The product writes past the end of a buffer that was allocated on the stack.
How developers prevent this class of flaw
- Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking. D3-SFCV (Stack Frame Canary Validation) from D3FEND discusses canary-based detection in detail.
- Use an abstraction library to abstract away risky APIs. Not a complete solution.
- Implement and perform bounds checking on input.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Third-party and government advisories
- runzero.com/advisories/fatfs-exfat-label-len-of-cve-2026-6687/Third Party Advisory
Technical write-ups (may include proof of concept)
- github.com/runZeroInc/vulns-2026-fatfs-chanceThird Party Advisory, Exploit
- runzero.com/blog/fatfs-bugs/Third Party Advisory, Exploit
Other references
- elm-chan.org/fsw/ff/Product
Other vulnerabilities in FatFs
- 7.6 High severity
- 7.6 High severity
Recent Stack-based Buffer Overflow vulnerabilities
- 7.8 High severity
- 9.8 Critical severity
- 9.8 Critical severity
- 9.8 Critical severity
- 9.8 Critical severity
- 8.8 High severity
Spotted an error? Tell us.