Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6532345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:59:27+00:00 2026-05-25T09:59:27+00:00

Lets say you have a JavaScript widget which needs to fire off a request

  • 0

Lets say you have a JavaScript widget which needs to fire off a request to your web application if and only if the user wants to click on it. You don’t want this request to be vulnerable to CSRF so you write an iframe to the page. Based on the origin inheritance rules the parent site won’t be able to read the CSRF token. However what about clickjacking (or likejacking )? Because of CSRF you must be within an iframe and there for the x-frame-options cannot help, and the same holds true for frame-busters.

The attacker is going to apply an SVG mask the iframe after the widget has loaded. This mask will make the iframe invisible. At this point the attacker can either resize the iframe to be the size of the page or have this now invisible iframe follow the cursor. Either way whenever the user clicks anywhere on the page, the iframe receives the click event and its game over.

So there is a duality, it seems you are stuck between CSRF and Clickjacking. What the best solution (if any) to this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:59:27+00:00Added an answer on May 25, 2026 at 9:59 am

    Clicking on the widget needs to open a pop-up window containing a new page — an iframe is not good enough, it must be a new window — which is entirely under the control of your web application. Confirm the action, whatever it is, on that page.

    Yes, this is somewhat inelegant, but the present Web security architecture doesn’t give you any better options.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given an html/javascript 'widget' which needs to have certain fields customized before use. For
Lets say I have a javascript function call moveItem which takes two parameters source
Lets say I have an application that updates it javascript/css files (and keeps the
Lets say I have several web sites on my web server, all as applications
Lets say I have a single object of type Car which I want to
for example lets say i have the html <div id=container> <div id=js-widget> <script srcxxxyyyzzz
Lets say I have an intraweb application (written in Delphi 2010) with an iwEdit
Hi guys lets say I have the following html: <div class=owner> <div> <a href=javascript:void(0)
Let's say I'm using git locally only, for web work in JavaScript. I've got
coming from clojure I need to write some javascript functions Lets say I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.