Reflected xss in user name thru cookie
A user's display name containing an XSS payload was reflected in a flash message stored in a signed cookie, which was then rendered unsafely. An attacker could execute script in another user's browser by having their name included in a message shown to that user.
Originally disclosed on HackerOne
- Triaged in 1 hour
- Fixed in 22 days
- Disclosed after 22 days
Imagine, that we have user A with name - name<script>alert(1)</script> And user B User B request a sim card and the Add authorization to user A (of course this is not the common way to exploit). As a result we have xss thru user name in flash message thru cookie. And (!) we got properly singed cookie with xss payload messages="29972147bc558baf382bbeb0b829d4efec82de2f$[["__json_message"\0540\05425\054"Authorization will be given to name<script>alert(1)</script> once this user confirms."]]"; Path=/
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
What the attacker needed
Attacker controls a user name; victim interacts with attacker's account
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 website let people put a name containing a script tag. That name was saved in a cookie and later shown on another user's page without being made safe, so the script could run in that user's browser.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.