Knowledge · Libraries

FatFs vulnerabilities by version: R0.16, R0.15 and what the SDKs ship

FatFs R0.16: 5 CVEs in the NVD, also with patch 2. Most STM32Cube packages still ship R0.12c.

All six need a crafted file system, such as an SD card or an update image. On 10 July 2026 the author, ChaN, fixed three of them with patch 2 for R0.16 and classed two as not a defect.

As of 27 October 2026 · 5 min readYou make the conformity statement. This page and our reports provide technical findings as its basis.

At a glance
Newest revision
R0.16, 22 Jul 2025
NVD CVEs R0.11 to R0.15
6 each
CVSS 9.0 or higher
none
All CVEs dated
1 July 2026
Patch 2 for R0.16
10 July 2026

NVD, queried 27 October 2026

How many CVEs does the NVD list for my FatFs revision?

Counted are CVEs whose NVD configuration lists the version as vulnerable, queried on 27 October 2026 through the NVD API, without rejected entries. The NVD has listed FatFs only since 2 July 2026, as cpe:2.3:a:elm-chan:fatfs:r0.16. The revision needs its „r“ in the query: 0.16 without it returns 6 instead of 5, because it sorts before r0.16.

The scores come from runZero, who reported the vulnerabilities; the NVD has none of its own.

Revision, release dateCVEs according to the NVD, of which CVSS 9.0 or higher
R0.16, 22 Jul 2025 (newest)5 CVEs, none at 9.0 or higher; also with patch 2
R0.15b, 21 Jun 20256 CVEs, none at 9.0 or higher
R0.15a, 22 Nov 20246 CVEs, none at 9.0 or higher
R0.15, 6 Nov 20226 CVEs, none at 9.0 or higher
R0.14b, 17 Apr 20216 CVEs, none at 9.0 or higher
R0.13c, 14 Oct 20186 CVEs, none at 9.0 or higher
R0.12c, 4 Mar 20176 CVEs, none at 9.0 or higher
R0.116 CVEs, none at 9.0 or higher
FatFs R0.16 in the NVD
curl -s "https://services.nvd.nist.gov/rest/json/cves/2.0?virtualMatchString=cpe:2.3:a:elm-chan:fatfs:r0.16&noRejected" | jq .totalResults
Output
5
FatFs R0.12c in the NVD
curl -s "https://services.nvd.nist.gov/rest/json/cves/2.0?virtualMatchString=cpe:2.3:a:elm-chan:fatfs:r0.12c&noRejected" | jq .totalResults
Output
6

Which six FatFs CVEs exist, and what does the author say?

runZero published all six on 1 July 2026. The attack path is physical: a crafted FAT or exFAT file system on an SD card, a USB stick or in an update image that the firmware mounts. ChaN, the author of FatFs, released patch 2 for R0.16 on 10 July 2026 and commented on each CVE on his patch page.

CVE, CVSS (runZero)Status according to the author
CVE-2026-6682, 7.6Fixed by patch 2 for R0.16.
CVE-2026-6687, 7.6Fixed by patch 2 for R0.16.
CVE-2026-6683, 4.6Fixed by patch 2 for R0.16.
CVE-2026-6688, 7.6Not a defect in FatFs: the application has to pass a large enough buffer.
CVE-2026-6686, 4.6Described in the manual, not a defect.
CVE-2026-6684, 4.6Does not affect R0.16; the NVD counts it only up to before R0.16.

Which FatFs version do STM32Cube, ESP-IDF and Zephyr ship?

FatFs rarely enters a build as its own download, but as part of an SDK. What counts is the state in the SDK, and the SDK vendor sets it. Most current STM32Cube packages still ship R0.12c from 2017. ST tagged an R0.16 with patch 2 in the stm32-mw-fatfs repository on 4 September 2026; none of the packages checked pins it yet.

SDK, releaseFatFs inside
STM32CubeF4 1.28.3, F7 1.17.4, H7 1.13.0, L4 1.18.2, G4 1.6.3, G0 1.6.3, WB 1.24.0, L5 1.6.0R0.12c
STM32CubeH7RS 1.3.0R0.15 with patch 2
STM32CubeF1 1.8.7R0.11
ESP-IDF 6.1R0.16; Espressif lists all seven runZero CVEs as fixed or not applicable
ESP-IDF 6.0.3, 5.5.6, 5.3.6, 5.2.8R0.15 with patch 2 and Espressif's fixes, according to sbom.yml
Zephyr 4.4.2R0.16 without patch 2
Zephyr 3.7.2 (LTS)R0.15 with patch 1
Zephyr 4.5.0-rc3R0.16 with patch 2

What does the NVD count miss?

The NVD knows the revision, but not the patch level. An R0.16 with patch 2 counts there like one without. Conversely an R0.15 with Espressif's fixes counts in full.

Searching only OSV or package URLs finds nothing: OSV lists none of the six CVEs, and the GitHub advisories for them name no package. runZero rejected CVE-2026-6685; ChaN calls the behaviour intentional.

Where is the FatFs version in my firmware?

In the source tree the revision is in ff.h as FF_DEFINED (80386 for R0.16, 80286 for R0.15) and in the first line of ff.c with the patch level, such as „R0.16 w/patch 2“. For R0.12c the macro is still called _FATFS (68300).

The compiled image does not hold the revision: FF_DEFINED is a preprocessor constant and never reaches the binary. Visible are only texts such as „FAT32“, „EXFAT“ or „MSDOS5.0“, which show that FatFs is linked. The version then follows from the SDK the build used, or from the code itself.

The revision in the R0.16 source tree
grep -n "define FF_DEFINED" source/ff.h

Output

23:#define FF_DEFINED	80386	/* Revision ID */

How do I check this by hand?

  1. 1

    Read the revision: ff.h (FF_DEFINED or _FATFS) and the first line of ff.c for the patch level.

  2. 2

    Check in the image that FatFs is linked: strings -a firmware.elf | grep -E "FAT32|EXFAT".

  3. 3

    For STM32Cube read the package's FatFs version from Middlewares/Third_Party/FatFs, for ESP-IDF from components/fatfs.

  4. 4

    Query the NVD with cpe:2.3:a:elm-chan:fatfs:r<revision>, with the „r“.

  5. 5

    Read ChaN's patch page against your state: patch 2 fixes three of the five CVEs of R0.16.

  6. 6

    Check whether a foreign file system can reach the firmware at all: SD card, USB mass storage, update image.

Can this run automatically?

LegacyMind reads the RTOS and the linked libraries with their versions from the build and checks each against the vulnerability sources, with the place in the build where it was found. If the binary proves no version, the field stays empty.

Questions

Is FatFs R0.16 with patch 2 still vulnerable?

According to the author three of the five CVEs are fixed by it, and two are not a defect in FatFs. The NVD still counts 5, because it does not know the patch level. Check CVE-2026-6688 in your application: the buffer size is up to the caller.

Which FatFs version is in STM32CubeF4?

R0.12c from 4 March 2017, as of STM32CubeF4 1.28.3. The NVD lists 6 CVEs for it on 27 October 2026.

Is a FatFs vulnerability actively exploited?

As of 27 October 2026 no FatFs vulnerability is in the CISA catalogue of known exploited vulnerabilities (catalogue version 2026.10.26).

Can an attacker reach FatFs remotely?

The score names a physical attack path: a crafted file system. If your firmware loads update images or files from the network onto a FAT drive, that path becomes remote.

Sources

  1. [1]ChaN: FatFs Revision History
  2. [2]ChaN: FatFs Patches
  3. [3]runZero: FatFs bugs
  4. [4]STMicroelectronics: stm32-mw-fatfs
  5. [5]NIST NVD: CVE API 2.0
  6. [6]CISA: Known Exploited Vulnerabilities Catalog

Check your own image

Upload one firmware image, an AXF or a supplier SBOM in your own LegacyMind account. Report and SBOM within three working days, NDA on request. The app and the reports are in German; questions in English are welcome.