# CVE-2026-6683: ChaN FatFs divide by zero in exFAT sync logic

Source: https://junglewise.ai/threats/cve-2026-6683-chan-fatfs-divide-by-zero-in-exfat-sync-logic  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-01. Updated: 2026-07-01  
License: CC BY 4.0 with a link back

CVE-2026-6683 · Severity: medium · CVSS 4.6 · Published 2026-07-01

FatFs is a widely used software library that allows small embedded devices, such as industrial controllers and consumer electronics, to read and write to SD cards and USB drives. A flaw in how it handles specific storage formats (exFAT) allows a maliciously prepared memory card to crash the device as soon as it tries to save data. This can lead to permanent equipment failure or 'bricking' if the crash occurs during a critical system update.

Technologies: [ChaN FatFs](https://junglewise.ai/threats/technologies/fatfs). Vendors: [ChaN](https://junglewise.ai/threats/vendors/chan).

## Quick answers

**Is CVE-2026-6683 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-6683 being exploited in the wild.

**How severe is CVE-2026-6683?** Medium severity, with a CVSS score of 4.6, published 1 July 2026.

**Which products and versions are affected?** ChaN FatFs R0.16 and earlier.

**Is there a fix for CVE-2026-6683?** 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-6683 attacked?** It is attacked with physical access, in a software library.

**Am I affected by CVE-2026-6683?** 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 divide-by-zero vulnerability (CWE-369) exists in the exFAT free-space accounting logic within the sync_fs() function. When a crafted exFAT volume sets the BPB_NumClusEx field to zero, the internal variable n_fatent collapses to 2, resulting in a division by zero during arithmetic operations used to calculate cluster usage percentages. The vulnerability is triggered during f_write, f_sync, or f_close operations on the affected volume. This leads to a processor hard fault or SIGFPE, causing a denial of service. While primarily a physical attack vector via malicious media, it may be reachable remotely in systems that process network-delivered disk images or OTA updates.

## Affected products

- ChaN FatFs R0.16 and earlier

## Timeline

- 2026-07-01: disclosed: Vulnerability published in NVD and by runZero research team.

## References

- [https://elm-chan.org/fsw/ff/](https://elm-chan.org/fsw/ff/)
- [https://github.com/runZeroInc/vulns-2026-fatfs-chance](https://github.com/runZeroInc/vulns-2026-fatfs-chance)
- [https://www.runzero.com/advisories/fatfs-exfat-divide-by-zero-cve-2026-6683](https://www.runzero.com/advisories/fatfs-exfat-divide-by-zero-cve-2026-6683)
- [https://www.runzero.com/blog/fatfs-bugs/](https://www.runzero.com/blog/fatfs-bugs/)

## Related threats

- [ChaN FatFs buffer overflow in long filename handling](https://junglewise.ai/threats/cve-2026-6688-chan-fatfs-buffer-overflow-in-long-filename-handling)
- [ChaN FatFs stack overflow in f_getlabel](https://junglewise.ai/threats/cve-2026-6687-chan-fatfs-stack-overflow-in-f-getlabel)
- [ChaN FatFs uninitialized cluster exposure in f_lseek](https://junglewise.ai/threats/cve-2026-6686-chan-fatfs-uninitialized-cluster-exposure-in-f-lseek)
- [ChaN FatFs integer underflow in f_read and f_write](https://junglewise.ai/threats/cve-2026-6685-chan-fatfs-integer-underflow-in-f-read-and-f-write)
- [ChaN FatFs infinite loop in GPT partition scanning](https://junglewise.ai/threats/cve-2026-6684-chan-fatfs-infinite-loop-in-gpt-partition-scanning)
