X-Frame-Options or CSP frame-ancestors is set
Why it matters
Clickjacking embeds your app inside an attacker-controlled <iframe>, then overlays a transparent UI that tricks users into clicking buttons they can't see — authorizing transactions, enabling permissions, or deleting accounts on your behalf. The attack requires zero user credentials and is invisible to the victim. Without framing protection, any page on your site is a potential weapon: login buttons, payment confirmations, settings toggles. CAPEC-103 documents the attack pattern in detail. OWASP A05 identifies missing framing controls as a security misconfiguration. X-Frame-Options: DENY is a single-line fix that eliminates the entire attack surface.
Severity rationale
Medium because clickjacking requires attacker-controlled page delivery but can silently authorize destructive actions on behalf of authenticated users.
Remediation
Add either X-Frame-Options or the CSP frame-ancestors directive. frame-ancestors is preferred in modern configs because it's more expressive and part of CSP Level 2.
// next.config.js — choose one approach
headers: [
// Option A: legacy X-Frame-Options
{ key: 'X-Frame-Options', value: 'DENY' },
// Option B: CSP frame-ancestors (more flexible)
{ key: 'Content-Security-Policy', value: "frame-ancestors 'none'" }
]
Use DENY / 'none' if your site never needs to appear in an iframe. Use SAMEORIGIN / 'self' if you embed your own pages. Do not use ALLOW-FROM — it is deprecated and ignored by modern browsers.
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 & Basics Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-1021 — Improper Restriction of Rendered UI Layers or Frames (Clickjacking)
- capec · CAPEC-103 — Clickjacking
- owasp:2021 · A05 — Security Misconfiguration
- soc2:2017 · CC6.6 — Protection against threats from outside system boundaries
Taxons
History
- 2026-04-17·v1.0.0·Initial import from security-headers·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