CVE-2026-6682
Received Received - Intake

Integer Overflow in FatFS Leading to Arbitrary Code Execution

Vulnerability report for CVE-2026-6682, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-01

Last updated on: 2026-07-01

Assigner: 44488dab-36db-4358-99f9-bc116477f914

Description

In FatFS R0.16 and earlier contains a FAT32 integer overflow bug in mount_volume() where fasize *= fs->n_fats can wrap, leading to attacker-controlled file-size metadata and unsafe read lengths in downstream callers. This maps to CWE-190 (Integer Overflow or Wraparound). 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). Remote delivery is also possible in OTA/update pipelines. The estimated CISA SSVC vectors are Exploitation: PoC, Technical Impact: Total.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-01
Last Modified
2026-07-01
Generated
2026-07-01
AI Q&A
2026-07-01
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 9 associated CPEs
Vendor Product Version / Range
elm-chan fatfs 0.16
chan fatfs to 0.17 (exc)
espressif iot_development_framework *
stmicroelectronics middleware_fatfs_mcu *
ardupilot ardupilot *
riot_os riot_os *
arm_limited mbed *
micropython micropython *
chan fatfs 0.16

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-190 The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-6682 is a high-severity vulnerability in ChaN's FatFs R0.16 and earlier versions involving an integer overflow bug in the FAT32 file system implementation.

Specifically, in the mount_volume() function, the multiplication of the variable fasize by fs->n_fats can overflow due to 32-bit arithmetic limits, causing the value to wrap around.

This overflow allows an attacker to control file-size metadata, which can then be used to forge values in downstream functions like f_stat() and f_readdir().

By exploiting this, an attacker can cause memory corruption during file read operations such as f_read(), potentially leading to unsafe behavior.

The vulnerability is mapped to CWE-190 (Integer Overflow or Wraparound) and has a CVSS v3.1 score of 7.6 (High).

Impact Analysis

This vulnerability can allow an attacker to manipulate file-size metadata in the FAT32 file system, leading to unsafe read lengths and memory corruption during file operations.

Such manipulation can cause crashes, data corruption, or potentially enable further exploitation depending on the context in which FatFs is used.

Remote exploitation is possible, especially in over-the-air (OTA) update pipelines, meaning attackers can deliver malicious FAT images remotely.

The flaw affects multiple downstream projects and embedded systems, increasing the risk in IoT devices and other systems relying on FatFs.

Detection Guidance

Detection of CVE-2026-6682 involves identifying the presence of vulnerable versions of ChaN's FatFs R0.16 or earlier in your system or devices.

Since the vulnerability is related to the FAT32 integer overflow in the mount_volume() function, detection can focus on scanning for the FatFs library version and monitoring for suspicious file-size metadata manipulations.

Commands to detect the vulnerable FatFs version or suspicious activity are not explicitly provided in the available resources.

Mitigation Strategies

Immediate mitigation steps include avoiding the use of vulnerable FatFs R0.16 or earlier versions in your systems.

Since remote exploitation is possible via OTA/update pipelines, ensure that any FAT images or updates are verified and come from trusted sources.

If possible, restrict or monitor access to removable media or update mechanisms that could deliver crafted FAT images.

No official patch or vendor response was available as of the disclosure date, so consider applying custom checks or workarounds to validate file-size metadata before processing.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-6682. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart