CVE-2026-6682
Analyzed Analyzed - Analysis Complete

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-02

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-02
Generated
2026-07-21
AI Q&A
2026-07-01
EPSS Evaluated
2026-07-20
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
elm-chan fatfs to r0.16 (inc)

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).

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.

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.

Compliance Impact

The vulnerability in FatFs R0.16 and earlier allows attacker-controlled file-size metadata and unsafe read lengths, leading to potential memory corruption and data integrity issues.

Such impacts on data integrity and confidentiality could pose significant risks for compliance with standards and regulations like GDPR and HIPAA, which require protection of sensitive data and prevention of unauthorized data manipulation.

Specifically, the ability for an attacker to remotely exploit this vulnerability (e.g., via OTA/update pipelines) and manipulate file metadata could lead to unauthorized data access or corruption, undermining the confidentiality, integrity, and availability requirements mandated by these regulations.

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