Stored XSS Led to OAuth App Credential Theft and Info Disclosure
A stored cross-site scripting flaw in the organization name field allowed an attacker to run JavaScript in any visitor's browser. The attacker could then steal organization details and OAuth application credentials, including the client secret.
medium.com
Published on medium.com
Free Article Link: Click for free!
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 organization name was stored and later rendered without sanitisation or output escaping, allowing script injection.
Impact
The attacker could read any visiting user's organization details and OAuth client ID and secret, which could enable unauthorised API access and further attacks.
What the attacker needed
Attacker account; victim visits a link; storefront made public
The fix
The report recommended sanitising user input on the backend, escaping output before rendering, and adding a Content Security Policy; it does not say whether these were implemented.
How it was found
- Create two accounts, one attacker and one victim.
- Log in as the attacker.
- Go to the Storefront page and put the malicious payload in the organization name field.
- Save the data and make the storefront public.
- Share the storefront link with the victim.
- When the victim visits the link, the payload runs in their browser.
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.
Cross-site scripting (XSS) is when a website saves or shows text from a user without cleaning it, so that text can include code that runs in other people's browsers. Here, the organization name was saved and shown on a public page, so any visitor's browser would run the attacker's code. That code could then read the visitor's private data from the site and send it to the attacker.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.