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.
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…
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
- The victim visits a page controlled by the attacker.
- 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.
- The victim pastes the payload into the TikTok search bar and presses enter.
- 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.