Skip to content

thumbcache_*.db file format: CMMM header and entry layout

Byte-level layout of Windows thumbcache and iconcache databases from Vista to Windows 11: file header, per-version cache types and the cache entry structure.

Published on 5 min read

This is a reference for the on-disk structure of Windows Explorer's thumbnail and icon caches (thumbcache_*.db, iconcache_*.db). The layout is undocumented by Microsoft. What follows is consistent with public research and open-source parsers such as Vinetto and Thumbcache Viewer, and is what the Thumbcache Parser implements. All integers are little-endian.

File header

OffsetSizeField
04Signature CMMM
44Format version
84Cache type (index into the table below)

What follows depends on the version:

VersionWritten byOffset 12Offset 16Offset 20Offset 24
0x14Vistafirst entryavailable entryentry count–
0x157first entryavailable entryentry count–
0x1A8first entryavailable entryentry count–
0x1C8 (v2)reservedfirst entryavailable entryentry count
0x1E8 (v3)reservedfirst entryavailable entry–
0x1F8.1reservedfirst entryavailable entry–
0x2010 / 11reservedfirst entryavailable entry–

First entry is the offset of the first cache entry. Available entry marks the start of free space: entries past it were freed, but their bytes are often still intact. A robust parser should check that the first-entry offset actually points at CMMM, and fall back to scanning if not.

Cache types

The cache type number maps to the file's size class, and the table changed between releases:

Version012345678910111213
Vista / 732962561024sr
8 (all)163248962561024srwideexif
8.11632489625610241600srwideexifwide_alternate
10 / 1116324896256768128019202560srwideexifwide_alternatecustom_stream

Cache entry

Entries follow each other back to back. The header is 48 bytes on Windows 7 and 56 bytes on Vista and Windows 8+:

FieldVista78 → 11
Signature CMMM000
Entry size (whole entry)444
Entry hash / cache ID (u64)888
Source extension (4 × UTF-16)16––
Identifier size241616
Padding size282020
Data size322424
Width––28
Height––32
Unknown362836
Data checksum (u64)403240
Header checksum (u64)484048

After the header come the identifier (UTF-16LE, usually the cache ID written as 16 hex digits), the padding, and the image data. The next entry starts at offset + entry size.

Entries with a data size of 0 are common. They are placeholders for items whose thumbnail was not generated or was dropped. They still carry a cache ID and so are worth keeping in a timeline.

Sanity checks when carving

When scanning for CMMM outside the live chain, reject a candidate unless:

  • the entry size is at least the header length and fits in the file;
  • header + identifier + padding + data ≤ entry size;
  • the identifier size is even and reasonably small.

These checks keep false positives rare, because CMMM does not occur often in image data.

The image data

The payload is a complete image file: BM (BMP), FF D8 FF (JPEG) or 89 50 4E 47 (PNG). Hash these bytes as-is for reporting. Windows 10 and 11 mostly store 32-bit top-down or bottom-up BMPs, which every modern browser can display.

thumbcache_idx.db

The index (IMMM) maps cache IDs to entry offsets in each size database, along with flags. It holds no images, and its layout varies more between builds. It is most useful for confirming that an ID was once cached even after the size databases were cleaned.

Further reading

Related articles

What thumbcache_*.db files prove in an investigation, how to recover deleted thumbnails, and the caveats to state before a thumbnail goes in a report.
Thumbcache Viewer, Vinetto, forensic suites and browser-based parsing compared: platforms, formats, deleted-entry recovery and file-name mapping.