Skip to content
XSS Write-up Intermediate

A blind XSS in messengers twins

The Telegram iOS app rendered HTML files sent as messages without sanitising the embedded JavaScript, allowing an attacker to run code in the app's webview. This let the attacker learn when the victim read the message, fingerprint the device, and obtain the victim's IP address and approximate location.

Omar Espino Follow

Published on omespino.com

2.- Run the “attacker server” and wait for the victim open the file (in my case was my own computer in my lan with the IP 192.168.1.120 and run the server with nc -lvvv 8090)

Omar Espino (@omespino), on omespino.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

Impact

An attacker could learn when the victim read the message, fingerprint the device, and obtain the victim's IP address and approximate city location, even if read receipts and last seen were disabled.

What the attacker needed

Victim opens the HTML file in Telegram iOS; attacker can send a message with an HTML file

The fix

The issue was fixed in a later Telegram iOS release.

How it was found

  1. Log in to Telegram and send an HTML file containing JavaScript as a message.
  2. Run a server to receive the data sent by the script.
  3. Open the HTML file in the Telegram iOS app as the victim.
  4. Observe the data received on the attacker's server.

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.

When you open a file in an app, the app should treat it as data, not as a program. Here, Telegram showed the HTML file in a built-in browser view and let any JavaScript inside it run. That script could quietly send information about you and your device to someone else.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by Omar Espino

View all

15 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.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.