DedSec Security Research · · Updated
Here is a hypothetical. A dynamic scan covers two applications a team owns, and returns five results about framing.
The main application, at app.example.com, keeps its session in a __Host- cookie with SameSite=Lax. Its first finding, rated medium, is "Missing X-Frame-Options header" on /settings/security, a page whose one button turns off two-step verification. The team closes it: with a Lax cookie, a framed page is logged out, so there is nothing to click. The second, rated low, is the same title on /api/v1/me, which returns JSON. The third is a pass on /billing/confirm: "Anti-framing script detected", because the page carries if (top != self) top.location = self.location.
The second application is the team's identity provider, at id.example.net, whose session cookie is SameSite=None so that silent re-authentication works inside an iframe. Its fourth finding is informational: "X-Frame-Options uses deprecated ALLOW-FROM value" on /account/linked-apps, sent as ALLOW-FROM https://partner.example, so that a partner can embed the page. The fifth is a pass on the OAuth consent screen, /oauth/authorize: "Clickjacking protection present", because the response carries X-Frame-Options: DENY.
In our lab, built to reproduce those shapes, every decision except the one about the JSON endpoint was wrong, or right only for a reason that did not hold everywhere. The Lax cookie did keep the settings page logged out inside a cross-site frame, in 5 of 5 attempts, and a page on a sibling subdomain framed the same page with every session cookie attached, Strict included, and a click on a decoy executed the action in 5 of 5. The ALLOW-FROM value was ignored, so every page we tried could frame the response. The DENY on the consent screen was never read, because the same response carried a CSP whose frame-ancestors https: overrides it. And the frame-busting script did not bust: Chromium refused its top-level navigation, because a cross-origin frame may not navigate the top window without a user gesture, so the click went through in every attempt.
This post is for whoever is holding a clickjacking or missing-header finding from a dynamic scan (CWE-1021, "Improper Restriction of Rendered UI Layers or Frames"), or a pass they are about to rely on. It covers:
X-Frame-Options and CSP, measured against a cross-site page, a sibling subdomain and the page's own originsandbox attributeIt belongs to our series on confirming DAST findings; the series guide sets out the evidence classes the series uses. The header rules themselves, what X-Frame-Options and frame-ancestors mean and how they interact, are set out from the specifications in the security headers post; this post measures them and goes on to what decides whether a missing header is a vulnerability. SameSite on cross-site requests is measured in the CSRF post, sibling subdomains defeating SameSite for a socket are in the WebSocket post, cookie attributes and who can write a session cookie are in the session management post, and the consent screen this post keeps coming back to is the subject of the OAuth post.
How we tested. Everything ran on 27 November 2026 on a shared test virtual machine, not on any production system: four vCPUs, Ubuntu 25.04, kernel 6.14.0, with every server bound to 127.0.0.1. The application was one HTTPS server in Python 3.12.9's standard library with a self-signed certificate, which chose its behaviour from the Host header. The browser mapped three names to 127.0.0.1 with a host-resolver rule, and nothing else resolved: app.site-one.test is the target, sib.site-one.test is a sibling subdomain an attacker controls, which is the same site but a different origin, and evil.site-two.test is an unrelated, cross-site attacker. All three used the same port.
The browser was Google Chrome for Testing 148.0.7778.96, headless, driven by Playwright 1.56.0 on Node.js 20.18.1 through an explicit executable path, because that Playwright release expects a different build. Playwright launches Chromium with its own switches, and three of them matter here: it disables the ThirdPartyStoragePartitioning feature (which partitions storage other than cookies), it disables the popup blocker, and it runs with --enable-automation. Each attempt used a fresh browser context, or, for the profile with third-party cookies blocked, a fresh profile directory whose Preferences file set Chrome's own cookie setting to block them; we read the setting back after each run to confirm it had held. Each attempt logged the victim into the target in the top-level window first, which set five session cookies that differ only in their attributes.
Across the final runs there were 358 browser attempts: three per cell for the header and frame-busting experiments, five per cell for the cookie experiment, three per cell for the redirect and frameless experiments. Every cell gave the same result in every attempt. Two first runs stopped on bugs in our harness, one because the target host did not serve the same-origin framing page, and one because our driver waited for the wrong URL; every result below is from the corrected runs.
The application is ours, and nothing in it is a measurement of any framework, of any browser other than the build named, or of any scanner, ours included. The HTML Standard's section on X-Frame-Options, the CSP Level 3 editor's draft, MDN's pages on X-Frame-Options, frame-ancestors, clickjacking, the iframe element, third-party cookies and CHIPS, the OWASP Clickjacking Defense Cheat Sheet, the OWASP Web Security Testing Guide's clickjacking test (WSTG-CLNT-09 in v4.2; WSTG-CLNT-08 on the master branch), CWE-1021, the Chrome Platform Status entry for the framebusting intervention, and Paulos Yibelo's DoubleClickjacking post were all fetched on 27 November 2026, and every quotation below was checked against those copies.
Clickjacking puts a page of your application inside an invisible frame on someone else's page, and lines up something the victim wants to click with something your page does. The victim's click lands in your page. Four facts have to be true for that to matter:
X-Frame-Options and CSP frame-ancestors on the response that ends up in the frame, and by nothing else.A scanner that reports "Missing X-Frame-Options" observed one fact about one response: neither header was there, or a value it did not recognise was. That is half of the first fact. It did not observe what the browser would do with the headers that were there, whether the session reaches a framed page, or whether the page has anything to click. The fourth fact is the one teams usually assume is in their favour, and it is the one that is reliably against them, as a section below shows.
| Finding | What the scanner observed | What it has to establish |
|---|---|---|
| Missing X-Frame-Options or frame-ancestors | Neither header on one response | That a page you do not trust can frame this response with the victim logged in, and that a click on it does something |
| Invalid or deprecated X-Frame-Options value | A value such as ALLOW-FROM | What the browser does with the whole set of headers, which for ALLOW-FROM is to ignore it |
| Clickjacking protection present (a pass) | X-Frame-Options: DENY or SAMEORIGIN | That no enforced frame-ancestors overrides it, on this response and every other response with a control |
| Anti-framing script detected (a pass) | A script that tests top against self | That the script stops the page being used in a frame, which depends on the browser and on the attacker's sandbox attribute |
The first experiment served one page, with a visible marker and the button, under twenty header configurations, and framed it from three places: the cross-site page, the sibling and a page on the target's own origin. A cell says whether the frame rendered the page, in all three attempts; there were no partial cells.
| Headers on the framed response | Cross-site | Sibling subdomain | Same origin |
|---|---|---|---|
| none | rendered | rendered | rendered |
X-Frame-Options: DENY | blocked | blocked | blocked |
X-Frame-Options: deny | blocked | blocked | blocked |
X-Frame-Options: SAMEORIGIN | blocked | blocked | rendered |
SAMEORIGIN, sent twice | blocked | blocked | rendered |
SAMEORIGIN and DENY, as two headers | blocked | blocked | blocked |
ALLOW-FROM naming the cross-site page | rendered | rendered | rendered |
ALLOW-FROM twice, naming the cross-site page and the sibling | rendered | rendered | rendered |
X-Frame-Options: DENY in a meta element only | rendered | rendered | rendered |
frame-ancestors 'none' | blocked | blocked | blocked |
frame-ancestors 'self' | blocked | blocked | rendered |
frame-ancestors naming the sibling | blocked | rendered | blocked |
frame-ancestors 'self' https://*.site-one.test:port | blocked | rendered | rendered |
X-Frame-Options: DENY and frame-ancestors * | rendered | rendered | rendered |
X-Frame-Options: DENY and frame-ancestors https: | rendered | rendered | rendered |
frame-ancestors 'none' in a meta element only | rendered | rendered | rendered |
frame-ancestors 'none' in Content-Security-Policy-Report-Only | rendered | rendered | rendered |
Report-Only frame-ancestors * and X-Frame-Options: DENY | blocked | blocked | blocked |
CSP default-src 'none' with no frame-ancestors | rendered | rendered | rendered |
X-Frame-Options: DENY and frame-ancestors 'none' | blocked | blocked | blocked |
Every row is what the specifications say, and the security headers post walks through why. Three rows decide most real findings.
An enforced frame-ancestors replaced X-Frame-Options entirely. The HTML Standard's check returns before it reads X-Frame-Options if any enforced policy has the directive: "if both a CSP frame-ancestors directive and an X-Frame-Options header are used in the same response, then X-Frame-Options is ignored." With DENY and frame-ancestors https:, every page we framed it from rendered it. A scanner that reports a pass on DENY without parsing the CSP on the same response has reported the header that lost.
ALLOW-FROM meant no header. The HTML Standard says the ALLOW-FROM variant "is not to be implemented", and lists ALLOW-FROM=https://example.com/ as "embedding allowed (from anywhere)"; MDN says modern browsers "will ignore the header completely". Two ALLOW-FROM lines, the way someone might try to allow two partners, are two invalid values, which the standard treats "the same way as if the header was omitted entirely". A duplicate of a valid value was harmless, and a mixture of a valid value with anything else blocked, which the standard calls blocking values that "appear confused".
SAMEORIGIN and 'self' are about origins, so they blocked the sibling. This is the property the cookie section below turns on: a sibling subdomain is the same site, so SameSite cookies reach it, but it is a different origin, so SAMEORIGIN, 'self' and 'none' all refused it. A wildcard such as https://*.site-one.test let it back in.
The meta rows and the Report-Only row are three ways of having the header and not having it: the CSP specification says "The frame-ancestors directive MUST be ignored when contained in a policy declared via a meta element", MDN says X-Frame-Options in a meta element "has no effect", and a Report-Only policy reports and enforces nothing. The row with a Report-Only frame-ancestors * and an enforced DENY is the inverse case: the Report-Only policy did not override the DENY, because only enforced policies take precedence.
A rendered frame is half the attack. The page in it has to be the victim's, and that depends on whether the request that loads the frame carries the session. Cookies with SameSite=Lax or Strict are sent on a cross-site request only if it is a top-level navigation (and Strict not even then), and loading an iframe inside another site's page is not one. MDN's clickjacking page recommends it as "an additional partial mitigation" on those grounds: requests from embedded contexts "that are not same-site with the top-level document will not include these cookies, and the server will therefore not treat the request as coming from a logged-in user."
We set five session cookies at login, all Secure and HttpOnly, differing in one attribute: SameSite=None, Lax, Strict, no SameSite attribute, and SameSite=None; Partitioned. Then the victim visited a page that framed the action page at an opacity of 0.0001 over a decoy button, and the harness clicked the decoy. The action page authenticated with one of the five cookies at a time, and showed the button only to a logged-in user. Each cell is attempts where the framed page was logged in, and where the click executed the action, out of five.
| Session cookie | Cross-site page, default profile | Cross-site page, third-party cookies blocked | Sibling subdomain, either profile |
|---|---|---|---|
SameSite=None | 5 / 5 | 0 / 0 | 5 / 5 |
SameSite=Lax | 0 / 0 | 0 / 0 | 5 / 5 |
SameSite=Strict | 0 / 0 | 0 / 0 | 5 / 5 |
| no SameSite attribute | 0 / 0 | 0 / 0 | 5 / 5 |
SameSite=None; Partitioned | 0 / 0 | 0 / 0 | 5 / 5 |
Every cell was the same in all five attempts.
From a cross-site page, only SameSite=None arrived, and only while third-party cookies were allowed. The Lax, Strict and unset cookies never reached the framed page, which rendered as signed out, with nothing to click. That is the reasoning behind the first finding in the opening scenario, and against a cross-site attacker it held. A cookie with no SameSite attribute behaved as Lax here. The CSRF post found Chromium sending such a cookie on a cross-site top-level POST within two minutes of it being set; that exception is for top-level navigations, and a frame is not one. MDN says the default is Lax "in Chromium-based browsers and varies across other browsers", so a session cookie with no attribute is a different finding in a browser that does not apply that default.
The sibling got every cookie, and the click executed every time. The framed request from sib.site-one.test carried all five cookies, with Sec-Fetch-Site: same-site, including Strict, and in both profiles, because a same-site frame is not a third-party context. The OWASP Clickjacking Defense Cheat Sheet now says this directly: "SameSite does not block framing or withhold cookies from same-site requests. An attacker-controlled sibling subdomain with the same scheme can be same-site while remaining a different origin." So a Lax session cookie closes the finding only if every host under the registrable domain is trusted to the level of the application: no user-supplied HTML on a help centre or a docs site, no cross-site scripting on any of them (the reflected XSS post covers confirming one), no hosted landing pages, no takeover-prone records (the dangling DNS post covers how an attacker comes to hold one). The WebSocket post found the same thing for sockets: a sibling got even the Strict cookie.
Blocking third-party cookies withdrew SameSite=None, and did nothing about the sibling. With Chrome's own setting turned to block third-party cookies, the None cookie stopped reaching the cross-site frame, 0 of 5, and the sibling still got everything. That is a property of the victim's browser, not of your application, and it varies. MDN's third-party cookies page, as fetched, says that "Google Chrome doesn't block third-party cookies by default, only in Incognito mode, or when users explicitly set it to block third-party cookies", that Firefox's Total Cookie Protection "gives third-party cookies a separate cookie jar per site" when Enhanced Tracking Protection is on, "as it is by default", and that Safari's tracking prevention applies similar protections by default. We tested none of those browsers. What we can say is that in this Chrome build an application whose session cookie is SameSite=None was clickjackable from any site, with no framing header, in Playwright's default context, and that a team cannot close the finding on the hope that its users have changed a setting.
A partitioned cookie was keyed to the top-level site that set it. The Partitioned session cookie was set while the victim was on the application itself, so its partition belongs to site-one.test. Inside a frame on site-two.test the partition key was different, and the cookie was not sent, in either profile. Inside a frame on the sibling, the top-level site was site-one.test again, and it was. MDN describes CHIPS cookies as "double-keyed: by the origin that sets them and the origin of the top-level page".
The framed request said where it came from. Every framed navigation in the experiment carried Sec-Fetch-Dest: iframe and Sec-Fetch-Site: cross-site or same-site. A server that refuses to serve sensitive pages to Sec-Fetch-Dest: iframe from anything but its own origin has a signal to work with. We did not test such a policy, and it would not help in a browser that does not send Fetch Metadata.
The action page in the lab is protected against CSRF the conventional way: the form carries a token bound to the session, and the server refuses a POST without it. It did not matter. In every attempt in the cookie experiment where the click executed, the POST that performed the action came from the application's own page, with the token that page had rendered, with Origin set to the application's own origin and Sec-Fetch-Site: same-origin. A cross-site request forgery is a request the attacker builds. A clickjacked request is built by your page and sent because the victim clicked your button. This is the point the WSTG makes when it says that "some of the anti-CSRF protections deployed by the developers to protect the web page from CSRF attacks could be bypassed": token checks, Origin checks and a Fetch Metadata policy that admits same-origin requests all see a legitimate request. The only request in the sequence that looks unusual is the GET that loads the frame.
The finding belongs to one response, not to the site. X-Frame-Options and frame-ancestors are read from the response that ends up in the frame, so a header on the home page protects the home page. The OWASP cheat sheet lists "Per-page policy specification" as a limitation of X-Frame-Options, and the WSTG warns that if a web proxy "strips the X-FRAME-OPTIONS header then the site loses its framing protection", and that a mobile version may lack it, because the header "has to be implemented in every page". The usual gaps are an error handler that renders HTML without the middleware that adds headers, a route served by a different component, and one edge or path that a proxy rewrites.
The final response decides, not the redirect. The fourth experiment framed a URL that answered 302 to the action page, with and without X-Frame-Options: DENY on each of the two responses. With the header on the redirect only, the page rendered in all three attempts; with it on the final response only, it was blocked in all three. So "missing X-Frame-Options" on a 302, a 301 or a 303 is a false positive about that response, and the question is what the redirect leads to. The same goes for an X-Frame-Options present on a redirect being treated as protection.
What makes a response worth a finding is what is on it:
And what does not:
X-Frame-Options "is only useful when the HTTP response where it is included has something to interact with (e.g. links, buttons). If the HTTP response is a redirect or an API returning JSON data, X-Frame-Options does not provide any security." The second finding in the opening scenario, on /api/v1/me, is this case. Its risk, if any, is a cross-origin information leak, which is a different finding.304 Not Modified. It has no body. What renders is the browser's cached copy, so the question is what headers that copy carries, which the 304 alone does not show. We did not test this case.Before the headers existed, pages defended themselves with script: if this page is not the top window, replace the top window with this page. The third finding in the opening scenario recorded a pass for that. The fifth experiment framed a page carrying one of two scripts, from the cross-site page, with six values of the iframe's sandbox attribute, and clicked the decoy. The two scripts were the classic one-liner, if (top != self) top.location = self.location, which the OWASP cheat sheet lists under "Insecure Non-Working Scripts DO NOT USE", and the cheat sheet's "best-for-now" legacy script, which hides the page with a style rule and removes the rule only when the page is the top window. The session cookie here was SameSite=None, so that the framed page was logged in.
sandbox attribute on the attacker's iframe | One-liner: top window navigated? | One-liner: click executed | Hide-unless-top: page visible? | Hide-unless-top: click executed |
|---|---|---|---|---|
| none | no | 3 / 3 | no | 0 / 3 |
allow-forms | no | 3 / 3 | no | 0 / 3 |
allow-forms allow-scripts | no | 3 / 3 | no | 0 / 3 |
allow-forms allow-same-origin | no | 3 / 3 | no | 0 / 3 |
allow-forms allow-scripts allow-same-origin | no | 3 / 3 | no | 0 / 3 |
allow-forms allow-scripts allow-top-navigation | yes | 0 / 3 | (navigated) | 0 / 3 |
The one-liner did not bust out even without a sandbox. The script ran, and Chromium refused the navigation, logging "Unsafe attempt to initiate navigation for frame with origin" for the attacker's page. Chrome has done this since version 68: its Platform Status entry, "Require user gesture for framebusting in cross-origin iframes", restricts a frame's ability to navigate the top window "to content that is processing a user gesture, unless it is same-origin to the parent". The entry's own motivation is that framebusting "was originally used by content that wanted to prevent being placed in an <iframe> but it's being abused", and the restriction applies to a defensive frame-buster exactly as it does to an abusive one. In this build, the script was not a defence at all.
A sandbox without allow-scripts stopped the script from running, and the console said so: "Blocked script execution ... because the document's frame is sandboxed". The form still submitted with allow-forms. The WSTG describes exactly this attacker configuration as "ideal for a clickjacking attack". One detail changed with the sandbox: without allow-same-origin the framed document has an opaque origin, and the POST the click sent carried Origin: null. An Origin check would refuse that, which is why the WSTG adds that "allow-same-origin is also required here for targets that check the Origin header". With it, the POST carried the application's own origin and the click executed.
The hide-unless-top script held in every configuration we tried, because it fails closed: if the script cannot run, or runs and cannot navigate, the page stays hidden, and a hidden button does not receive the click. Only allow-top-navigation, which no attacker would grant, let either script reach the top window. It is still the weaker defence. It hides the page from legitimate framers as well, it depends on script and on every page including it, and the cheat sheet frames it as a measure for "legacy browsers, that do not support the X-Frame-Options-Header". A pass recorded because a script was detected should be checked to see which script it is, and should not replace the header.
Everything above depends on a frame, and so does every header defence. In December 2024, Paulos Yibelo described a variant that uses none, which he called DoubleClickjacking. The attacker's page opens a new window, asking for a double-click. That window uses window.opener.location to navigate the attacker's original tab to the target page, an OAuth consent screen in his examples. On mousedown of the first click, the new window closes itself, and "The second click lands on the now-exposed authorization button in the parent window." He describes it as bypassing "the X-Frame-Options header, CSP's frame-ancestors and SameSite: Lax/Strict cookies". The WSTG's current clickjacking test, on its master branch, now has a section on it: "The target page is loaded as a top-level page, so X-Frame-Options and the frame-ancestors directive don't apply, and cookies with SameSite=Lax are sent with the navigation."
We could not measure the attack itself. It depends on one window uncovering another between the two clicks of a double-click, and a headless browser has no window stacking; our click was sent to the original tab directly, after the attacker's window had navigated it and been closed. What we could measure is the half that does not depend on timing: whether the page arrives logged in and whether the headers stop it. The page carried X-Frame-Options: DENY and frame-ancestors 'none'. Each cell is attempts in which the page rendered logged in and the click executed, out of three.
| Session cookie | Default profile | Third-party cookies blocked |
|---|---|---|
SameSite=None | 3 / 3 | 3 / 3 |
SameSite=Lax | 3 / 3 | 3 / 3 |
SameSite=Strict | 0 / 0 | 0 / 0 |
| no SameSite attribute | 3 / 3 | 3 / 3 |
SameSite=None; Partitioned | 3 / 3 | 3 / 3 |
The navigation arrived with Sec-Fetch-Site: cross-site and Sec-Fetch-Dest: document. It is a top-level navigation, so the framing headers had nothing to apply to, Lax cookies were sent as they are on any cross-site link, blocking third-party cookies did not apply because the page was first-party, and the partitioned cookie was in its own partition. Only Strict kept the page logged out. Yibelo's post lists Strict among the protections bypassed; in our measurement a Strict cookie did not arrive with the navigation, and we did not test the flows in his examples. Our result matches the OWASP cheat sheet's description: "Lax permits cookies on top-level navigations using safe HTTP methods, while Strict withholds them on the initial cross-site request." The popup was opened from a click; Playwright disables the popup blocker, which we did not test with it on.
So two conclusions from the lab hold whatever the timing turns out to be in a given browser: a framing header is not a defence against this variant, and a Lax session cookie does not keep the target page logged out. Whether the swap can be made reliable on a particular browser, screen and input device is the part we did not test. The OWASP cheat sheet's defences for it are server-side transaction authorisation for high-risk actions, and, as a "proposed supplementary mitigation", disabling sensitive controls until the user has interacted with the page, a mitigation Yibelo's post proposes. The cheat sheet warns that "Mouse movement or a key press alone does not establish that the user understands or approves the action."
The series sorts evidence by what it can prove. For clickjacking, the classes are:
X-Frame-Options and CSP lines. It establishes the first half of the first fact, and only if the scanner read every relevant header on that response, including frame-ancestors in an enforced CSP. It says nothing about the session or the action.The confirmation is the last class, with the browser, version, profile settings and framer's position written down. A scanner that sends no browser and no session can reach the first class only.
The procedure is general practice. It needs authorisation for the target, a test account to act as the victim, and a page on a host you control. Choose an action that is harmless and reversible on the test account, such as toggling a notification setting.
Content-Type and every header as received: every X-Frame-Options line, every Content-Security-Policy and Content-Security-Policy-Report-Only line, and any meta elements. Fetch it logged in as well as logged out; applications often send different headers to each, and the logged-in page is the one with the button.frame-ancestors, that is the policy and X-Frame-Options is irrelevant. Otherwise, DENY or SAMEORIGIN alone protect, and anything else, including ALLOW-FROM, is no header. List every origin the policy allows.Set-Cookie line that creates the session: its SameSite value or absence, Partitioned, Domain, and any prefix. If the session is a bearer token the page's script attaches, a framed page has it only if the script finds it in storage the frame can reach.SameSite=None cookie, any site, in browsers that allow third-party cookies. For Lax, Strict or a defaulted cookie, every host under the registrable domain: who can put HTML on each of them?| Change | Held against | Did not hold against |
|---|---|---|
frame-ancestors 'none' in an enforced header | the cross-site page, the sibling and the same origin, 3 of 3 each | a top-level navigation (it does not apply) |
frame-ancestors 'self', or X-Frame-Options: SAMEORIGIN | the cross-site page and the sibling | — in our tests |
frame-ancestors with a wildcard over your own domain | the cross-site page | the sibling, 3 of 3 |
X-Frame-Options: DENY with a permissive frame-ancestors | — | every framer: frame-ancestors overrode it |
X-Frame-Options: ALLOW-FROM | — | every framer |
frame-ancestors or X-Frame-Options in a meta element | — | every framer |
frame-ancestors in Report-Only | — | every framer |
| Header on the redirect, not the final page | — | the final page rendered, 3 of 3 |
SameSite=Lax or Strict session cookie | the cross-site frame, 0 of 5 logged in | the sibling, 5 of 5 executed; for Lax, the frameless navigation, 3 of 3 |
| Partitioned session cookie | the cross-site frame | the sibling; the frameless navigation |
| Third-party cookies blocked in the victim's browser | a SameSite=None session in a cross-site frame | the sibling; it is not a setting the application controls |
| CSRF token and Origin check on the action | — | the click, which sent the page's own token and origin |
| Frame-busting one-liner | only an attacker who grants allow-top-navigation | Chromium's own framebusting restriction, and every sandbox without that token: 15 of 15 executed |
| Hide-unless-top legacy script | every configuration we tried, 0 of 18 executed | — in our tests, at the cost of hiding the page from every framer |
What the held rows share:
Content-Security-Policy: frame-ancestors 'none', or 'self', as a response header on every HTML response. Name partner origins explicitly if the page must be embedded, never a scheme or a wildcard you do not fully control. Keep X-Frame-Options: DENY or SAMEORIGIN alongside for older clients, and make sure the two never disagree. Put it in the layer every response passes through, error pages included.window.confirm() before acting, which the cheat sheet treats as "supplementary confirmation, not a guarantee", noting that a sandboxed frame without allow-modals makes it return false.Most of this is quicker to read in configuration than to infer from responses. Find where the headers are set: a framework's security middleware, a web server's add_header or Header set, a CDN or edge rule, or per-route code. Then check four things. Does it apply to every response with HTML, including error pages and responses produced before the middleware runs? nginx's documentation is a good example of how this goes wrong: add_header adds the field only when "the response code equals 200, 201 (1.3.10), 204, 206, 301, 302, 303, 304, 307 (1.1.16, 1.0.13), or 308" unless the always parameter is given, and its directives "are inherited from the previous configuration level if and only if there are no add_header directives defined on the current level", so a location block that adds one header of its own silently drops the server-level X-Frame-Options (unless add_header_inherit merge, added in nginx 1.29.3, is set). Does any route set its own CSP, replacing the global frame-ancestors? Does anything add frame-ancestors https:, * or a wildcard host, perhaps for an embed feature? And is there any meta CSP someone believes is doing the job? For the cookie side, read the session cookie's configuration and list the hosts under its registrable domain, and for the action side, list the routes whose handler changes state on a single POST without re-authentication.
| Question | If the answer is no or unknown |
|---|---|
Did the scanner read every X-Frame-Options and CSP line on this exact response? | A DENY with frame-ancestors https: on the same response was framed by every page we tried |
Is the response a redirect, a 304, JSON or other non-HTML? | The header on a 302 made no difference; the final page decided |
Is the protection in an enforced response header, not a meta element or Report-Only? | All three were ignored, by every framer |
Is ALLOW-FROM the only value? | It was ignored, so the page was frameable from anywhere |
| Is there a control that changes state in one click, or a few, with nothing typed? | Without one there is nothing to clickjack; record it as hardening |
What is the session cookie's SameSite value, and is it None? | A None session reached a cross-site frame and the click executed, 5 of 5, in the default profile |
| Can every host under the registrable domain be trusted with the application's session? | A sibling got every cookie, Strict included, and the click executed in every attempt |
| Was the pass for a frame-busting script checked against the browser and a sandboxed frame? | The one-liner never left the frame, and the click executed in 15 of 15 attempts |
| Is a CSRF token or Origin check being cited as the mitigation? | The clickjacked POST carried the page's own token and origin |
| Is the page an OAuth consent screen or a high-risk action? | Test the frameless variant; framing headers do not apply, and a Lax session arrived |
| Was a click through the overlay seen to change state on a test account? | Without that, the finding is a header observation |
The scanner says the page has no X-Frame-Options. Is it vulnerable to clickjacking? Only if three more things are true: no enforced CSP frame-ancestors protects it, the framed page carries the victim's session for the attacker's position, and the page has a control that changes something with a click. In our lab, a page with no framing header but a SameSite=Lax session cookie rendered signed out in a cross-site frame in every attempt, and rendered signed in, with the click executing, from a sibling subdomain in every attempt.
Which wins, X-Frame-Options or CSP frame-ancestors? frame-ancestors, when it is in an enforced policy. The HTML Standard ignores X-Frame-Options in that case, and in our lab X-Frame-Options: DENY with frame-ancestors https: or frame-ancestors * was framed by every page we tried. A frame-ancestors in Report-Only does not override it.
Does SameSite=Lax prevent clickjacking? Against a cross-site page in a frame, in Chrome 148, yes in our lab: Lax, Strict and unset cookies did not reach the framed page. Not against a sibling subdomain, which got every cookie, and not against the frameless double-click variant, where Lax cookies arrived with the top-level navigation in every attempt.
Does X-Frame-Options ALLOW-FROM still work? No. The HTML Standard says it "is not to be implemented", and Chrome 148 framed a page sending it from every origin we tried, including ones it did not name. Use frame-ancestors with the partner's origin.
Can I set X-Frame-Options or frame-ancestors in a meta tag? No. Both were ignored in our lab, as MDN and the CSP specification say they will be. They have to be response headers.
Does a frame-busting script protect against clickjacking? The classic if (top != self) top.location = self.location did not: Chromium blocked the navigation, because a cross-origin frame needs a user gesture to navigate the top window, and a sandbox without allow-scripts stopped the script from running at all. A script that keeps the page hidden unless it is the top window held in every configuration we tried, but use the headers.
Does a CSRF token stop clickjacking? No. The click submits your own form from your own page, with its token and your origin. In our lab the clickjacked POST carried a valid token, Origin set to the application's origin, and Sec-Fetch-Site: same-origin.
Do API endpoints need X-Frame-Options? A JSON response has nothing to click, so a missing header on it is not a clickjacking finding. Setting frame-ancestors 'none' everywhere is still a simple default, and it means no response is missed.
What is DoubleClickjacking? A variant described by Paulos Yibelo in December 2024, in which a window the attacker opens navigates the original tab to the target page between the two clicks of a double-click, so the second click lands on the target as a top-level page. Framing headers do not apply. We measured only that such a navigation arrived with Lax session cookies and was not affected by X-Frame-Options: DENY or frame-ancestors 'none'; we did not reproduce the double-click itself.
One headless Chromium build, our own toy server, and nothing else. Not tested: Firefox, Safari, Edge or any other browser or version, including their third-party cookie defaults, Firefox's Total Cookie Protection and Safari's tracking prevention, all of which are described here from MDN; a headed browser, real mouse or touch input, and real window stacking, so the DoubleClickjacking timing itself; the popup blocker, which Playwright disables; Chrome's settings other than the one third-party cookie preference, and Incognito; the Storage Access API and related-website sets; nested frames and SAMEORIGIN with a cross-origin ancestor; multi-click sequences, drag-and-drop, cursor spoofing and other UI redressing techniques; mobile tapjacking; browser extensions; the designMode technique the cheat sheet mentions for Firefox; the onbeforeunload and 204 techniques it describes for defeating frame-busters in older browsers; a Fetch Metadata policy that refuses Sec-Fetch-Dest: iframe; bearer-token sessions; any web framework's security-header middleware or any web server's header handling; and any scanner, ours included.
/settings/security, closed because the session cookie is Lax. Right about a cross-site page in Chromium, and wrong as a reason to close. List the hosts that share app.example.com's registrable domain, every *.example.com, and who can put HTML on them; in our lab a sibling framed the page with every session cookie attached and the click executed in every attempt. The page also turns off two-step verification in one click, which is the kind of action the frameless variant targets, and Lax did not keep that page logged out. Add frame-ancestors 'none', and require re-authentication for the toggle./api/v1/me. It returns JSON, so there is nothing to click. Close it as not a clickjacking finding, or fix it by default with a site-wide frame-ancestors 'none'./billing/confirm, recorded as a pass. The script is the one-liner. In our lab, Chromium refused its navigation, and the click executed in 15 of 15 framed attempts across five sandbox configurations. With a Lax session, a cross-site frame shows the page signed out, so the pass happened to hold against cross-site pages, for a reason that has nothing to do with the script; from a sibling it did not. Reopen it, and fix it with the header./account/linked-apps, informational. Every page we tried could frame a response sending only ALLOW-FROM, and the identity provider's session cookie is SameSite=None, which reached a cross-site frame and let the click execute in 5 of 5 attempts in Chrome's default profile. If the page has a control, this is the most serious of the five. Replace the header with frame-ancestors naming the partner./oauth/authorize, recorded as a pass because of DENY. Read the CSP on the same response: frame-ancestors https: overrode the DENY for every framer we tried. With a SameSite=None session, any HTTPS site can show the consent screen signed in, and one click grants the attacker's client access. Narrow frame-ancestors to the origins that must embed it, and test the frameless variant on this page, since consent screens are the example it was described against.AppSecD's dynamic and API testing runs Nuclei, Dalfox, SQLMap, Commix, Katana, Arjun, FFuf and Interactsh for out-of-band detection, plus 150+ native checks and API discovery across 50+ web frameworks. Its policy-driven gating blocks a pull request or commit when it introduces a violation. Findings are deduplicated across scans, move through new, reopened and fixed states, and can require maker-checker approval before they are closed. Separately, Maphra, DedSec's external attack surface management product, includes security header analysis among the checks it runs across discovered assets, and each finding carries the raw response that produced it.
That is the whole claim. data/products.ts is the single source of truth for what these products do, and it does not mention clickjacking, framing, X-Frame-Options, frame-ancestors, SameSite or browser-based confirmation. So this post makes no claim that AppSecD tests for clickjacking, or about:
frame-ancestors and its precedence over X-Frame-OptionsThe mechanisms, measurements, confirmation procedure, fixes and checklist above are general practice that applies to any scanner's output, ours included. The scenario in this post is hypothetical and does not describe any deployment, user or finding.