Cross-Site-Scripting on www.tiktok.com and m.tiktok.com leading to Data Exfiltration
A URL parameter reflected unsanitised input, enabling reflected cross-site scripting. A separate endpoint vulnerable to cross-site request forgery allowed setting a new password on accounts created via third-party sign-up, and chaining both gave a one-click account takeover.
- Triaged in 5 days
- Fixed in 22 days
- Paid in 22 days
- Disclosed after 3 months
Summary by the program
The researcher discovered a URL parameter reflecting its value without being properly sanitized and was able to achieve reflected XSS. In addition, researcher found an endpoint which was vulnerable to CSRF. The endpoint allowed to set a new password on accounts which had used third-party apps to sign-up. Researcher combined both vulnerabilities to achieve a "one click account takeover".
Summary by the researcher
While fuzzing, I discovered a URL parameter reflecting its value without being properly sanitized. Thus, I was able to achieve reflected XSS. In addition, I found an endpoint which was vulnerable to CSRF. The endpoint enabled me to set a new password on accounts which had used third-party apps to sign-up. I combined both vulnerabilities by crafting a simple JavaScript payload - triggering the CSRF - which I injected into the vulnerable URL parameter from earlier, to archive a "one click account takeover".
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the URL parameter was echoed into the page without output encoding, and the password-change endpoint lacked a CSRF token or origin check.
What the attacker needed
Victim clicks a crafted link; account created via third-party sign-up; victim is logged in
How it was found
- Fuzz URL parameters and find one that reflects its value unsanitised.
- Confirm reflected XSS by injecting script into that parameter.
- Find an endpoint that sets a new password and is vulnerable to CSRF.
- Craft a JavaScript payload that triggers the CSRF request.
- Inject that payload into the vulnerable URL parameter to chain both issues.
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 report has not been written yet. The Original tab links to the source.
Cross-site scripting (XSS) lets an attacker run their own JavaScript in a victim's browser on the target site. Cross-site request forgery (CSRF) tricks a logged-in user's browser into sending a request the user did not intend, such as changing a password. Here the attacker combined both so that visiting one link could take over an account.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.