CVE-2026-6688: ChaN FatFs buffer overflow in long filename handling

CVE-2026-6688 · Severity: high · CVSS 7.6 · Published 2026-07-01

FatFs is a widely used software library that allows small embedded devices, such as IoT sensors and industrial controllers, to read and write data to SD cards and USB drives. A vulnerability exists in how the library handles long filenames, which can cause the software to crash or allow unauthorized code execution when a specially crafted storage device is inserted. This flaw impacts a broad range of downstream products including the Zephyr RTOS, Samsung TizenRT, and various firmware for CNC machines and drones.

Technologies: ChaN FatFs. Vendors: ChaN.

Quick answers

Is CVE-2026-6688 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-6688 being exploited in the wild.
How severe is CVE-2026-6688?
High severity, with a CVSS score of 7.6, published 1 July 2026.
Which products and versions are affected?
ChaN FatFs R0.16 and earlier.
Is there a fix for CVE-2026-6688?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-6688 attacked?
It is attacked with physical access, in a software library.
Am I affected by CVE-2026-6688?
Check whether you run ChaN FatFs at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A buffer overflow vulnerability (CWE-120) exists in the integration patterns of ChaN FatFs R0.16 and earlier. When Long Filename (LFN) support is enabled, the 'fno.fname' field can contain up to 255 characters, but many downstream callers allocate buffers based on the shorter 8.3 filename standard (typically ~13-14 bytes). Attackers can exploit this by providing a FAT-formatted storage medium containing crafted long filenames, which triggers overflows in functions like strcpy() or sprintf() within the calling application. This pattern has been identified in multiple major embedded projects, including Zephyr RTOS, NodeMCU, and TizenRT. Exploitation requires physical access to insert the malicious media but can result in total system compromise.

Affected products

  • ChaN FatFs R0.16 and earlier

Timeline

  • 2026-06-30: advisory: Initial advisory published by runZero
  • 2026-07-01: disclosed: CVE-2026-6688 published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.