HSTS preload flag configured
Why it matters
HSTS preload eliminates the first-visit vulnerability — the one TCP request a browser makes over HTTP before it receives the HSTS header and commits to HTTPS. Without preload, a user who has never visited your site before (or who cleared browser storage) is vulnerable to SSL stripping on that first connection. CWE-311 and CWE-319 apply — the initial plaintext request exposes cookies, tokens, and session data to network-level interception before HSTS takes effect. OWASP A02 (Cryptographic Failures) identifies first-visit HTTP exposure as a transport security gap that preloading permanently eliminates.
Severity rationale
Medium because first-visit HTTP exposure requires network-position attack access, but HSTS preloading is the only control that eliminates this window entirely for users who have never visited before.
Remediation
Add all three required HSTS directives for preload eligibility. Preloading is irreversible on short timescales — only proceed if HTTPS is permanent for your domain and every subdomain.
// next.config.js
headers: [{
source: '/(.*)',
headers: [{
key: 'Strict-Transport-Security',
value: 'max-age=31536000; includeSubDomains; preload'
}]
}]
After configuring, submit at hstspreload.org. All three are required: max-age >= 31536000, includeSubDomains, and preload. Removing from the preload list takes months — do not add preload for staging or short-lived domains.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Security Headers II Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-311
- cwe · CWE-319
- owasp:2021 · A02
- soc2:2017 · CC6.6 — Protection against threats from outside system boundaries
Taxons
History
- 2026-04-18·v1.0.0·Initial import from security-headers-ii·automated
- 2026-07-06·v1.0.1·Add SOC 2 TSC mapping (CC6.6) from the verified compliance crosswalk register (docs/compliance/).·by soc2-mapping-enrichment-ship-2