Glossary
Clickjacking
Definition
Clickjacking: A UI redress attack: a malicious page loads a real website in a transparent or disguised frame and aligns its buttons under something the user means to click, so the click acts on the hidden site. Sites prevent it with CSP frame-ancestors or X-Frame-Options.
Also known asUI redress attackUI redressingframe hijacking
In short
Clickjacking, or a UI redress attack, loads a real website in a hidden or disguised frame on an attacker's page and lines up its buttons under something you mean to click, so your click acts on the hidden site where you're signed in. Sites stop it by refusing to be framed, with the Content-Security-Policy frame-ancestors directive and the older X-Frame-Options header.
Key takeaways
- Clickjacking turns your own click into an action on a site hidden in a frame.
- It works because you're signed in to the hidden site, so it acts as you.
- The fix belongs to the framed site, which tells browsers who may embed it.
- frame-ancestors 'none' blocks every frame and overrides X-Frame-Options when both are sent.
- Protect every page that has an action, not only the sign-in page.
Last reviewed 4 December 2026 by Foxcolab Team
Clickjacking is an attack in which a malicious page loads a real website inside a hidden or disguised frame and lines up that site's buttons under something you mean to click. Your click lands on the hidden site, where you're signed in, so it acts as you. OWASP calls it a "UI redress attack," in which "an attacker uses multiple transparent or opaque layers to trick a user into clicking on a button or link on another page."
A worked example#
OWASP's classic case: a page offers a "click here for a free iPod" button. Over it sits an invisible frame showing your webmail, positioned so its "delete all messages" button is exactly where the bait is. You click for the prize and empty your inbox. Any action that takes one or two clicks is a target, such as making a private file public.
How sites stop it#
The defense belongs to the site being framed: it tells the browser who may embed it.
Content-Security-Policy: frame-ancestors 'none'
X-Frame-Options: DENY| Control | What it does |
|---|---|
frame-ancestors | Part of Content Security Policy. It "restricts the URLs which can embed the resource," says CSP Level 3. 'none' blocks everyone, 'self' allows your own origin, or list trusted origins |
X-Frame-Options | The older header. DENY or SAMEORIGIN. When both are sent, "the frame-ancestors directive overrides the X-Frame-Options header" |
| SameSite cookies | OWASP also suggests SameSite=Strict or Lax on sign-in cookies, so a page framed by another site tends to load signed out |
The common mistake is protecting only the sign-in page. Every page with a button worth hijacking needs the header, including settings and sharing screens.
In Foxcolab#
Foxcolab Drive, Docs, Sheets, Notes, Whiteboard and the Forms editor send both frame-ancestors 'none' and X-Frame-Options: DENY, so browsers refuse to show them inside another site's frame. foxcolab.com sends X-Frame-Options: SAMEORIGIN. Embedded forms are the one deliberate exception, because they're made to sit on your website. To keep a form off other sites, open its Settings, go to Link preview & search and add your domains to Sites allowed to embed; anywhere else, the form shows "This form can't be shown on this site." See share, embed and prefill a form.
Clickjacking only pays off against a signed-in session, so it pairs with session hijacking as a reason to sign out of devices you don't use. Create a free account.
Keep exploring
Related terms
- Content Security Policy (CSP)A Content Security Policy tells the browser which scripts, frames and connections a page may use, so an injected script doesn't run. Here's a strict policy explained line by line.
- Same-origin policyThe same-origin policy stops a web page from reading data that belongs to another origin. Here's what counts as an origin, what the rule blocks, and where cookies differ.
- Cross-site request forgery (CSRF)Cross-site request forgery tricks your browser into sending a request to a site where you're signed in, so the site acts on it as if you meant it. Here's how it works and how sites stop it.
- Session cookieA session cookie is either a cookie that disappears when the browser session ends or the cookie that keeps you signed in. Here's what each attribute does and why stolen ones matter.
- PhishingPhishing is impersonation used to trick people into handing over passwords, approving payments or opening malware. Here's how it works and what actually stops it.
Where Foxcolab uses it

Foxcolab
Private work tools, without the ads.
Mail, files, documents, spreadsheets and meetings in one account. Files, documents and spreadsheets are end-to-end encrypted.