Skip to main content
HSTS SUPERCOOKIE
secret

HSTS Supercookie Demonstration

How security features can be weaponized for tracking

November 30, 2025

HSTS (HTTP Strict Transport Security) is a security feature that protects you from downgrade attacks. However, it can be abused to create "supercookies" that persist even after you clear your browser data.

How HSTS Supercookies Work

1

Binary Encoding

A unique identifier is converted to binary (e.g., "42" โ†’ "101010"). Each bit represents one subdomain.

2

HSTS Flag Setting

For each "1" bit, the tracker loads a subdomain over HTTPS with HSTS. For "0" bits, it uses HTTP without HSTS.

3

Reading the Cookie

On future visits, the tracker requests each subdomain via HTTP. If HSTS redirects to HTTPS, that bit is "1". Otherwise, it's "0".

4

Persistence

HSTS policies are stored separately from cookies and browsing history. They survive clearing cookies, private browsing, and browser restarts.

Why This Is Concerning

๐Ÿ•ต๏ธ Invisible Tracking

Unlike cookies, HSTS supercookies leave no visible trace. Users have no way to know they're being tracked.

๐Ÿงน Resistant to Clearing

"Clear browsing data" doesn't remove HSTS entries. The tracking ID persists indefinitely.

๐ŸŽญ Bypasses Private Mode

Some browsers share HSTS state with incognito mode, defeating privacy protections.

๐Ÿ”— Cross-Site Tracking

The same HSTS supercookie can be read across different websites, enabling comprehensive tracking.

// Example: 32-bit HSTS Supercookie

User ID: 2,847,591,038
Binary: 10101001110100111000101011111110
Subdomains: 32 unique subdomains
Persistence: Up to 2 years (HSTS max-age)