Skip to content
UI spoofing Write-up Beginner

How I found clickjacking vulnerability on a bounty target

The password reset page lacked the Content-Security-Policy frame-ancestors header that the login page had, so an attacker could embed it in a malicious site and trick a victim into clicking hidden elements. This could lead to unintended actions such as resetting the victim's password.

medium.com

Published on medium.com

Hi, Sadra here! In this write-up, we’ll take a look at clickjacking vulnerabilities and how I discovered one in a web application.

Sadra Bakhtiari, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the password reset page was missing the Content-Security-Policy frame-ancestors header that was present on the login page.

Impact

An attacker could trick a victim into resetting their password or performing other unintended actions by hiding the reset page under deceptive elements.

What the attacker needed

Victim visits attacker-controlled page; victim interacts with hidden elements

The fix

The password reset page should include the same Content-Security-Policy frame-ancestors header as the login page to prevent framing.

How it was found

  1. Analyse HTTP headers of a login subdomain using a proxy.
  2. Compare the initial login page response with the password reset page response.
  3. Notice the password reset page lacks the CSP frame-ancestors header.
  4. Host a local page that embeds the password reset page in a frame.
  5. Open the local page and confirm the target page loads inside the frame.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Clickjacking is when a bad site secretly loads a real site in an invisible frame and tricks you into clicking buttons you cannot see. Here, the password reset page could be framed because it was missing a security header that tells browsers not to allow framing. That means an attacker could make you reset your password without realising it.

What is UI spoofing?

The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.

Similar reports

View all

Same bug class and techniques, clearest first.

Clickjacking and UI spoofing

The lesson behind this report.

The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.