Environment Setup
Auth0 applications have the implicit grant flow enabled by default, and the Management API allows user-level access from all applications, so an XSS on one application can be used to obtain access tokens for other APIs in the same tenant and to link an attacker-controlled identity to a victim's account. The authors show how this lets an attacker pivot from a vulnerable web app to an admin API and to persistent account takeover.
elttam.com
Published on elttam.com
Auth0 is a popular cloud-based identity and access management (IAM) platform that helps developers add authentication and authorisation to their applications, without building those systems from scratch. It provides flexible, developer-friendly APIs and SDKs for seamless integration across web, mobile, and backend…
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
Impact
An attacker with an XSS on one application could obtain access tokens for other APIs in the same tenant and, if the victim consents, link an attacker-controlled account to the victim's account for persistent access; the iframe variant did not work in Firefox, and the attack is blocked if API access policies are restricted and the azp claim is validated.
What the attacker needed
An XSS vulnerability in one Auth0-protected app; victim is logged in to the vulnerable app; API access policy allows all applications; victim consents to the requested scope
The fix
Auth0 applications should have the implicit grant flow disabled, API access policies should be restricted to approved applications with azp validation on the backend, and user access to the Management API should be disabled.
How it was found
- Find an XSS vulnerability in a web application that is protected by Auth0.
- Build an Auth0 /authorize URL that uses the implicit grant flow with response_type=token and the target API's audience.
- Use the XSS to open that URL in an iframe or a new window and wait for the OAuth callback.
- Read the access token from the URL fragment of the callback and send it to the attacker's server.
- Use the stolen token to call the target API, or request the update:current_user_identities scope and link an attacker-controlled 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 write-up has not been written yet. The Original tab links to the source.
Auth0 is a service that handles logins for many apps. This article shows that some of its default settings are unsafe: a script injected into one app can quietly ask Auth0 for a token that unlocks other apps in the same account, and can even trick a user into linking an attacker's login to their own account. The fix is to turn off the old token flow and restrict which apps may request which APIs.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.