Auditing Auth0
Auth0 (by Okta) is an identity-as-a-service platform: sign-in, sign-up, MFA and OAuth 2.0 / OIDC token issuance for a tenant’s applications. As with Okta, the risk is rarely in the platform and almost always in the configuration:
- legacy flows that are still enabled;
- APIs that accept tokens from any application in the tenant;
- backends that validate the JWT signature and nothing else.
That’s how a single XSS in a minor application can turn into access to the others.
Responsibility model
Section titled “Responsibility model”Auth0 runs the authorization server, the user store and attack detection. The customer decides:
- which applications exist and which grant types each one has;
- which connections (database, social, enterprise) are enabled on each application and whether they allow sign-up;
- which applications can request tokens for each API;
- which Management API scopes users can request;
- how each backend validates tokens;
- which attack protections are on, and with what response.
flowchart LR
U["User"] -->|"login"| A["Auth0 tenant<br/>connections, MFA"]
A -->|"token: aud, azp, scope"| S1["App A<br/>(with XSS)"]
A -->|"token"| S2["Admin SPA"]
S1 -.->|"implicit flow<br/>token in the URL"| X["Attacker"]
X -->|"token with the API's aud"| API["Admin API"]
S2 --> API
API -->|"validates iss, aud, azp, exp"| OK["Accept?"]
Applications and grant types
Section titled “Applications and grant types”Each application has its grant types under Settings → Advanced Settings → Grant Types. Things to review:
- Implicit. Returns the token in the URL fragment. According to elttam’s research (June 2026), it is still enabled by default on Auth0 applications, even though Auth0 itself discourages it in favor of Authorization Code with PKCE.
- Password (Resource Owner Password). The application receives the user’s password directly and doesn’t go through Universal Login. It should only exist for very specific legacy cases.
- Client Credentials. Only on machine-to-machine applications, with the secret stored as a secret.
- Callback URLs and Allowed Web Origins. No broad wildcards: a return URL the attacker can control lets them steal codes or tokens (see OAuth).
The tenant’s discovery document shows which types the server supports, not what each application has enabled. Even so, it’s the first thing to check from the outside. A real example with Auth0’s public samples tenant:
curl -s https://samples.auth0.com/.well-known/openid-configuration \ | jq -c '{response_types_supported, grant_types_supported}'{"response_types_supported":["code","token","id_token","code token","code id_token","token id_token","code token id_token"],"grant_types_supported":["client_credentials","authorization_code","refresh_token","password","implicit","urn:ietf:params:oauth:grant-type:device_code","urn:ietf:params:oauth:grant-type:token-exchange","http://auth0.com/oauth/grant-type/password-realm","http://auth0.com/oauth/grant-type/passwordless/otp","http://auth0.com/oauth/grant-type/mfa-oob","http://auth0.com/oauth/grant-type/mfa-otp","http://auth0.com/oauth/grant-type/mfa-recovery-code","urn:ietf:params:oauth:grant-type:jwt-bearer"]}To find out whether a specific application accepts the implicit flow, test a request to /authorize with its client_id and response_type=token in the authorized environment.
APIs: who can request tokens
Section titled “APIs: who can request tokens”In Auth0, each API has an identifier that goes in the token’s aud. Auth0’s documentation warns that, by default, any user of any application can request any permission defined on an API. There are two defenses, and it’s worth having both:
- The API’s access policy, which limits which applications can request it as an audience.
- Validation in the backend:
iss,aud,expand, above all,azp(the application that requested the token) against an allowlist of applications.
Lab: what validating only the signature lets through
Section titled “Lab: what validating only the signature lets through”A simulated tenant with PyJWT 2.15.1 and its own RSA key. The “naive” backend only checks the signature; the proper one also validates issuer, audience and azp.
import time, jwtfrom cryptography.hazmat.primitives.asymmetric import rsa
# Lab "tenant" key (with real Auth0 it comes from /.well-known/jwks.json)key = rsa.generate_private_key(public_exponent=65537, key_size=2048)public = key.public_key()ISS = "https://company-lab.eu.auth0.com/"MY_API = "https://api.shop.test"MY_SPA = "spa_client_id_lab"
def token(**changes): now = int(time.time()) c = {"iss": ISS, "sub": "auth0|ana", "aud": MY_API, "azp": MY_SPA, "iat": now, "exp": now + 600, "scope": "read:orders"} c.update(changes) return jwt.encode(c, key, algorithm="RS256", headers={"kid": "lab"})
def naive(t): # only checks the signature return jwt.decode(t, public, algorithms=["RS256"], options={"verify_aud": False})
def proper(t): c = jwt.decode(t, public, algorithms=["RS256"], audience=MY_API, issuer=ISS, options={"require": ["exp", "iss", "aud", "sub"]}) if c.get("azp") != MY_SPA: raise jwt.InvalidTokenError(f"unexpected azp: {c.get('azp')}") return c
cases = { "legitimate token": token(), "token for another API (aud)": token(aud="https://admin.shop.test"), "token from another app (azp)": token(azp="other_tenant_app"), "expired token": token(exp=int(time.time()) - 60),}print(f"{'case':34} {'signature only':34} full validation")for name, t in cases.items(): r = [] for f in (naive, proper): try: f(t); r.append("accepts") except jwt.PyJWTError as e: r.append(f"rejects ({type(e).__name__})") print(f"{name:34} {r[0]:34} {r[1]}")Real output:
case signature only full validationlegitimate token accepts acceptstoken for another API (aud) accepts rejects (InvalidAudienceError)token from another app (azp) accepts rejects (InvalidTokenError)expired token rejects (ExpiredSignatureError) rejects (ExpiredSignatureError)All the tokens are signed by the same tenant, so the signature can’t tell apart a token meant for another API or requested by another application. PyJWT checks exp even when not asked to; aud, iss and azp have to be requested.
Management API and account linking
Section titled “Management API and account linking”The Management API manages the tenant. Besides the admin scopes, it supports user scopes following the {action}:current_user_{resource} pattern. elttam’s study shows that, by default, any application can request them. Among them is update:current_user_identities, which allows linking another identity to the user’s account: with a token stolen via XSS, the attacker could link an identity of their own to the victim’s account and keep access. Review the Management API’s access policy and which user scopes are allowed.
Automatic account linking by email is another sensitive point. If an Action or rule merges accounts that share an email without checking email_verified, an account created with someone else’s address can end up merged with theirs. The same happens with database connections that still allow sign-up even though the website only shows social login: sign-up can be called directly.
Attack protection and logs
Section titled “Attack protection and logs”Security → Attack Protection groups:
| Protection | What it detects |
|---|---|
| Bot Detection | IP with bot reputation; requires CAPTCHA |
| Suspicious IP Throttling | Many attempts from one IP against many accounts |
| Brute-force Protection | Many attempts from one IP against one account |
| Breached Password Detection | Passwords that appear in breaches |
According to Auth0’s documentation, enabling them without configuring the response leaves them in monitoring mode: they only log events. During the audit, look at the configured response, not just the toggle.
Useful tenant log events for detection (see SIEM):
| Code | Meaning |
|---|---|
fp / fu |
Failed login due to password / non-existent user |
limit_wc |
IP blocked after too many failures against one account |
pwd_leak / signup_pwd_leak |
Login or sign-up with a leaked password |
fs / ss |
Failed / successful sign-up |
Real cases
Section titled “Real cases”- CVE-2018-6873. The Auth0 authentication service before October 15, 2017 did not validate the JWT audience, allowing privilege escalation. Auth0 fixed it in the platform and published a security bulletin.
- Default implicit + XSS (elttam, 2026). In a test environment, an XSS in a secondary web application uses the implicit flow to obtain a token with the admin API’s audience. The API accepts it because its policy allows every application in the tenant and doesn’t validate
azp. The study’s recommendations: disable legacy flows, restrict access policies and limit the Management API’s user scopes.
Checklist
Section titled “Checklist”- Implicit and Password disabled on every application that doesn’t need them
- SPAs with Authorization Code + PKCE; Client Credentials only on machine-to-machine applications
- Callback URLs, Allowed Logout URLs and Web Origins without broad wildcards
- Each API with an access policy limited to its applications
- Backends that validate
iss,aud,expandazp - Management API policy reviewed; no
update:current_user_identitiesunless needed - Account linking only with
email_verified; sign-up disabled on connections that don’t use it - Attack protections with a configured response, not in monitoring mode
- MFA for users and for the dashboard; tenant logs sent to the SIEM