CVE-2026-6684: FatFs GPT Parser Denial of Service Vulnerability (CWE-835)
FatFs, a widely-used embedded filesystem library, contains a denial-of-service vulnerability in versions before R0.16 when GPT (GUID Partition Table) scanning is enabled with 64-bit LBA support. An attacker with physical access to a storage device can craft a malicious GPT header with an extremely large or unbounded partition count value, causing any system mounting that device to enter an effectively infinite loop during initialization. This results in a hung or unresponsive device at mount time, disrupting availability without requiring authentication or user interaction.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 4.6 MEDIUM · CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-835
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-07-01 / 2026-07-02
NVD description (verbatim)
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.
5 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability resides in FatFs's GPT partition table parser when FF_LBA64 = 1 is configured. The code reads the GPTH_PtNum field from the GPT header to determine how many partition entries to scan, but does not properly bound or validate this count. An adversary can set GPTH_PtNum to an extremely high value (e.g., 0xFFFFFFFF or similar), causing the parsing loop to iterate an unbounded number of times. This maps to CWE-835 (Loop with Unreachable Exit Condition), where the loop's termination condition is either unreachable or dependent on untrusted external data. The loop executes during filesystem mount, making the device unresponsive until power-cycled or the operation times out (if timeout handling exists). No memory corruption or data compromise occurs; impact is purely availability-based.
Business impact
Embedded systems and IoT devices relying on FatFs for SD card, USB storage, or other removable media access become vulnerable to denial of service when an attacker gains physical access to supply a malicious storage device. In industrial, medical, or critical infrastructure deployments, this could prevent a device from booting or resuming operation, disrupting business continuity. For consumer devices, the attack surface is limited by physical access requirements, but in shared environments (kiosks, public terminals, medical devices in hospitals) the risk is elevated. The impact is operational downtime rather than data breach or system compromise.
Affected systems
FatFs versions prior to R0.16 that are compiled with GPT support (FF_USE_LBA64 or equivalent) and 64-bit LBA enabled (FF_LBA64 = 1). This affects embedded systems, microcontroller projects, automotive infotainment systems, industrial equipment, medical devices, and any IoT platform using FatFs for removable media support. Systems using only MBR (Master Boot Record) partitioning or with GPT support disabled are not affected. Verify your FatFs version and configuration flags in your project's ffconf.h or equivalent build configuration.
Exploitability
Exploitation requires physical access to craft a malicious storage device (SD card, USB drive, external SSD) with a modified GPT header. The attack is trivial from a technical perspective—writing a specific byte value to the GPT header—and requires no authentication or user interaction once the device is inserted. However, the attack surface is constrained by the physical access requirement. CISA's estimated SSVC vectors indicate Exploitation level is PoC (proof-of-concept available), meaning reliable attack demonstrations exist but weaponized exploits may not yet be broadly distributed. Organizations in environments with loose physical security or shared device access face higher practical risk.
Remediation
Upgrade FatFs to version R0.16 or later, which includes validation and bounding of the GPTH_PtNum field to prevent unbounded loop execution. During the upgrade, verify that your build configuration properly enables the GPT parsing module and test with both well-formed and intentionally malformed partition tables to confirm the fix. For legacy systems that cannot be upgraded immediately, consider disabling GPT support if MBR partitioning is sufficient, setting FF_USE_LBA64 = 0 in the configuration. Implement physical access controls to prevent unauthorized insertion of untrusted storage devices.
Patch guidance
Obtain FatFs R0.16 or later from the official elm-chan FatFs repository (http://elm-chan.org/fsw/ff/00index_e.html). Review the release notes and changelog for the specific fix to GPTH_PtNum validation. In your embedded project, update the FatFs source files, recompile with your existing ffconf.h settings, and perform regression testing on your target hardware with both standard and edge-case partition table layouts. If your project uses a fork or vendor-modified version of FatFs, contact your vendor for an updated release or backport the fix manually (the change should be isolated to the GPT parsing logic). Test on representative storage devices used in your deployment.
Detection guidance
Monitor for mount failures or unexplained system hangs when inserting external storage devices. If your system includes logging, check for timeout messages during the filesystem initialization phase. For development and testing, simulate the attack by using a disk editor or specialized tool to modify the GPTH_PtNum field in a test storage device's GPT header and confirm that your patched version handles it gracefully (either rejecting the partition table or completing the scan in reasonable time). In production, implement a watchdog timer or mount operation timeout to prevent indefinite hangs; if a mount attempt exceeds a threshold (e.g., 30 seconds), log an alert and forcibly abort the operation.
Why prioritize this
Although the CVSS score is 4.6 (Medium), the vulnerability should be prioritized for remediation because it affects a foundational component used across many embedded and IoT ecosystems. The simplicity of exploitation and the requirement for only physical access make it a practical concern in high-physical-security environments or shared-access scenarios. For systems in customer premises, vehicles, or untrusted locations, the attack surface is non-negligible. However, organizations with strict physical security policies or those not using GPT partitioning can safely defer patching; the medium CVSS and lack of KEV status indicate this is not an emergency across all deployments.
Risk score, explained
The CVSS v3.1 score of 4.6 (Medium) reflects the high severity of denial of service (Attack Vector: Physical, Availability Impact: High) tempered by the requirement for physical access and the absence of confidentiality or integrity impact. The vector CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H confirms that once an attacker has physical access, the attack is trivial (low complexity, no privileges or user interaction required) and guaranteed to cause a significant availability disruption. CISA's SSVC assessment (Exploitation: PoC, Technical Impact: Partial) aligns with this: the vulnerability is demonstrable but not yet mass-exploited, and the harm is confined to availability rather than widespread system compromise. Organizations should weigh this score against their physical security posture and the criticality of devices in their environment.
Frequently asked questions
Does this vulnerability affect FatFs systems that only use MBR partitioning?
No. The vulnerability is specific to GPT partition table parsing and is only triggered when GPT scanning is enabled and FF_LBA64 = 1. Systems configured to use MBR only or with GPT support disabled are not vulnerable. Check your ffconf.h or build configuration to verify which partition scheme is active.
Can an attacker exploit this remotely over the network?
No. The vulnerability requires physical access to insert or supply a storage device with a malicious GPT header. Remote exploitation is not possible. However, in scenarios where an attacker can temporarily access a device's storage subsystem (e.g., a shared facility with physical access), the attack becomes practical.
What happens if the mount operation times out during the unbounded loop?
If your system or filesystem driver has a timeout mechanism in place, the mount attempt will eventually fail and return an error, preventing permanent hang. However, the device will be unresponsive for the duration of the timeout (which could be minutes), causing denial of service. Systems without a timeout will hang indefinitely until power-cycled. Upgrading to the patched version eliminates the loop entirely, providing immediate robustness.
Are there any workarounds if I cannot upgrade FatFs immediately?
Yes. Disable GPT support by setting FF_USE_LBA64 = 0 in ffconf.h if your deployment can rely solely on MBR partitioning. Implement a watchdog timer to forcibly abort filesystem operations that exceed a reasonable time threshold (e.g., 30 seconds). Additionally, enforce strict physical access controls to prevent untrusted storage devices from being inserted. However, upgrading remains the recommended long-term solution.
This analysis is provided for informational purposes and is based on publicly available vulnerability data and vendor advisories as of the publication date. SEC.co makes no warranty regarding the completeness or accuracy of this information. Organizations should independently verify all patch versions, affected product configurations, and applicability to their environment before implementing remediation. Physical access controls and testing should be performed according to your organization's change management and security policies. Consult the official FatFs repository and your vendor's security advisories for the most current guidance. This document does not constitute professional security advice or a comprehensive risk assessment for your specific infrastructure. Source: NVD (public-domain), retrieved 2026-08-10. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-10028MEDIUMglib-networking GnuTLS Certificate Validation Denial-of-Service
- CVE-2026-10642MEDIUMZephyr PL011 UART Infinite Loop Denial of Service (CWE-835)
- CVE-2026-14258MEDIUMdhcpcd IPv6 Router Advertisement Parser DoS Vulnerability
- CVE-2026-15163MEDIUMWireshark Protocol Dissector Infinite Loop DoS Vulnerability
- CVE-2026-41150MEDIUMMermaid Gantt Chart DoS via Excludes Attribute
- CVE-2026-44740MEDIUMBilly Go Library Denial-of-Service via Input Validation Flaws
- CVE-2026-46146MEDIUMLinux Kernel USB Audio Infinite Loop DoS Vulnerability
- CVE-2026-46314MEDIUMLinux Kernel DRM v3d Infinite Loop DoS Vulnerability