Skip to content
UI spoofing Write-up Intermediate

Redressing instagram leaking application tokens via instagram clickjacking vulnerability

Instagram AJAX responses, including the page that lists connected application access tokens, could be loaded in an iframe because they lacked X-Frame-Options. An attacker could frame the response and trick a victim into copying the token content and sending it back, allowing account hijacking.

Mohamed A. Baset Follow

Published on seekurity.com

Today i will show you a ClickJacking bug i found in Instagram that allowed me to iframe ajax responses and leads attackers to steal your instagram connected applications tokens hence hijack your account!

Mohamed A. Baset, on seekurity.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 AJAX endpoint returned sensitive token data without an X-Frame-Options header, so the response could be embedded in an attacker's iframe.

What the attacker needed

Victim is logged in to Instagram; victim interacts with attacker's page; social engineering required

How it was found

  1. Open the Instagram page that manages connected application access tokens.
  2. Note that the normal page is protected by X-Frame-Options and cannot be framed.
  3. Add the __a=1 parameter to the URL to get an AJAX JSON response containing the tokens.
  4. Observe that this JSON response can be iframed.
  5. Build a proof-of-concept page that frames the response and tricks the victim into copying and sending the content back.

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 malicious site loads a real page inside an invisible frame so your clicks or actions land on that page without you realising. Here, the framed page showed secret access tokens for apps connected to the victim's Instagram account, and the attacker could trick the victim into copying and sharing them. With those tokens, the attacker could take over the account.

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.

More by Mohamed A. Baset

View all

20 more disclosed reports, best first.

More from Meta

View all

The newest disclosed reports for this program.

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.