Skip to content
XSS Write-up Intermediate

XSS on TikTok

The TikTok search bar reflected a payload without a parameter, causing self-XSS, and the site was also vulnerable to clickjacking. The attacker combined these to trick a victim into copying and pasting the payload, leading to script execution and cookie theft.

19whoami19 Follow

Published on 19whoami19.medium.com

While I was surfing TikTok I got that their is a misconfiguration from the server which even it can encode some characters to prevent XSS but it can’t prevent it in the client side , so I was able to get it in the search bar but their is a problem which is that theirs is no parameter the payload get reflected in , and…

WHO AM I ?, on 19whoami19.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 search input was reflected without proper output encoding on the client side, and the site lacked clickjacking protections, allowing the two issues to be chained.

Impact

An attacker could execute arbitrary JavaScript in the victim's TikTok session and steal cookies, potentially leading to account takeover.

What the attacker needed

Victim visits attacker page; victim pastes payload into search bar

How it was found

  1. The victim visits a page controlled by the attacker.
  2. The page automatically copies the XSS payload to the clipboard and shows a pop-up asking the victim to paste it into the search bar.
  3. The victim pastes the payload into the TikTok search bar and presses enter.
  4. The XSS payload executes in the victim's browser.

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.

Self-XSS only affects the person who types the malicious code into their own browser, so it is usually not a real risk. Clickjacking lets an attacker hide a page inside another page and trick you into clicking things you did not intend to click. By combining the two, the attacker made a victim copy and paste the code, turning a harmless self-XSS into a real attack.

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 19whoami19

View all

1 more disclosed report, best first.

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.