Escalating stored XSS to Account Takeover
A team name field allowed HTML tags without sanitisation, and the stored payload executed when a member was invited, exposing session cookies. An attacker could invite a victim to a malicious team and steal their cookies when the victim invited another member, leading to account takeover.
medium.com
Published on medium.com
Let's call it redacted.com cause the vulnerability is still exist and I just want to show how I escalated Stored XSS to ATO.My target redacted.com has a function that can create a team.So,why don't we try some XSS or SSTI or others.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the team name input was not sanitised or escaped before being rendered in the context of inviting members, allowing stored HTML/JavaScript to execute.
Impact
An attacker could steal session cookies of team members, leading to account takeover, as demonstrated by the author.
What the attacker needed
Attacker can create a team; victim is invited to the team; victim invites another member
How it was found
- Create a team with a name containing HTML tags such as an image tag.
- Observe that the team name page shows a blank page, indicating the tags are not rendered there.
- Add a member to the team and click the invite button; the incomplete image appears, showing the tags are reflected.
- Change the team name to a simple XSS vector and invite a member; a pop-up shows the session cookie.
- Craft a payload that sends the user's cookies to an external collaborator.
- Invite a victim to the malicious team; when the victim invites a new member, the stored XSS triggers and the attacker receives the victim's session cookies.
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 write-up has not been written yet. The Original tab links to the source.
The website let people put HTML code into a team name without cleaning it up. When other users viewed that team name, their browsers ran the code, which could send their login cookies to the attacker. Cookies are small pieces of data that keep you logged in, so stealing them lets an attacker act as you.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.