Summary
Auth0.js versions 8.11.0 to 9.32.0 may, under specific conditions, return user profile information when presented with a valid access token and a specially crafted but invalid ID token.
This behavior can unintentionally disclose user data to a party that should not be authorized to access that profile information.
Affected context
This vulnerability affects applications that integrate Auth0.js (versions 8.11.0 to 9.32.0) on the client side to perform authentication and retrieve user profiles.
It arises in flows where both an access token and an ID token are processed together and the application relies on the SDK's result for user profile retrieval without independently validating token correctness.
The issue becomes relevant when an attacker can influence or supply an invalid, specially crafted ID token alongside a valid access token.
Exploit preconditions
- Attack surface: Client-side authentication flows using Auth0.js to obtain and process ID/access tokens.
- Required access: Ability to supply or manipulate authentication responses or tokens in the browser context (e.g., via crafted redirect URLs, modified responses, or control of the client environment).
- Trigger point: Invocation of Auth0.js APIs that handle ID tokens and access tokens and then request or return user profile information.
- Why exploitation is possible: The SDK's authorization logic under certain conditions does not correctly enforce that an invalid ID token should block access to profile data, allowing profile information to be returned based primarily on the valid access token while disregarding the invalid nature of the accompanying ID token.
Why this happens
The root cause aligns with CWE-863: Incorrect Authorization, where the system fails to properly verify that a request is fully authorized before returning protected data.
In this case, the Auth0.js SDK's handling of mixed token inputs (a valid access token combined with a specially crafted invalid ID token) appears to allow a successful profile retrieval flow when it should instead reject the request.
This indicates a misalignment between the intended security model of token-based authorization (both token validity and intended use must be satisfied) and the implemented logic within the SDK's profile retrieval mechanisms.
Potential impact
- Unauthorized disclosure of user profile information to an entity that should not have access.
- Exposure of personal or identifying information associated with the Auth0 user account.
- Facilitation of account correlation or user enumeration if profile attributes are observable.
- Increased risk when combined with other vulnerabilities or misconfigurations that amplify data exposure.
General mitigation guidance
Effective mitigation generally focuses on tightening token validation and authorization checks around profile retrieval:
- Ensure that ID tokens and access tokens are fully validated, including signature, issuer, audience, and expiration, before relying on them for authorization decisions.
- Treat user profile retrieval as an access-controlled operation that must be explicitly authorized based on both token validity and intended token purpose (e.g., ID vs. access token scopes).
- Avoid assuming that the presence of a seemingly valid access token alone is sufficient for returning sensitive profile data when other authentication artifacts are invalid or inconsistent.
- Implement defense-in-depth by performing server-side validation of tokens and authorization decisions where possible, reducing reliance on client-side logic.
- Apply the principle of least privilege by limiting the amount and sensitivity of profile data returned for routine client-side requests.
How teams detect issues like this
Detection approaches can focus on both code behavior and runtime patterns:
- Static analysis / code review: Look for client-side flows that implicitly trust Auth0.js responses without independently validating tokens or checking for error states when ID tokens are invalid or malformed.
- Behavioral testing: Design tests where invalid or malformed ID tokens are paired with valid access tokens and observe whether profile data is still returned; include these as regression tests.
- Logging and monitoring: Capture detailed logs around authentication and profile retrieval operations, including token validation outcomes and reasons for success/failure, to identify anomalous cases where data is returned despite token validation issues.
- Policy enforcement: Introduce security policies or linters in CI pipelines that flag patterns where client-side token processing is the sole gatekeeper for sensitive profile retrieval logic, recommending server-side verification.

