Skip to content
UI spoofing Write-up Intermediate

Telegram WEB client clickjacking vulnerability

The Telegram web client lacked the X-Frame-Options header and relied on JavaScript frame busting, so an attacker could embed it in a sandboxed iframe and, by blocking the main stylesheet, make the hidden page visible and clickjack logged-in users. This could let the attacker change account settings, send messages or contact requests, and mark messages as read on the victim's behalf.

Mohamed A. Baset Follow

Published on seekurity.com

Modern Web Applications nowadays are relaying on a lot of technologies where typical web applications vulnerabilities are hard to find (eg. Clickjacking is an ABC security bug) but bug hunters are always the best!

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

The site relied on client-side JavaScript frame busting and a CSS display rule instead of the server-side X-Frame-Options header, so a sandboxed iframe plus blocking the stylesheet defeated both defences.

Impact

An attacker could change sensitive account information, send messages and contact requests, send group invites, and mark messages as read on behalf of a logged-in user, though the attack required network interception to block a stylesheet.

What the attacker needed

Victim is logged in to Telegram web; attacker can MITM the local network; attacker blocks the main stylesheet; victim visits attacker's page

The fix

The bug was fixed by adding the X-Frame-Options header on the server side.

How it was found

  1. Intercept the local network traffic (MITM) to prevent access to the main stylesheet.
  2. Embed the Telegram settings page in a sandboxed iframe that allows scripts but prevents top-window redirection.
  3. With the stylesheet blocked, the page becomes visible and the attacker can overlay it to capture clicks.

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 site invisibly inside a frame and tricks you into clicking buttons there. Telegram tried to stop this with a script that breaks out of frames, but the attacker used a sandboxed frame to stop that script and hid the page with CSS until the stylesheet was blocked. The fix was to send an X-Frame-Options header so browsers refuse to frame the site at all.

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 Telegram

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.