Summary
A broken authorization vulnerability in the /api/v1/user self-service routes allows public-only tokens to bypass restrictions intended to protect private resources. An attacker possessing such a token may access private user-related data or operations when the endpoint relies on token type without enforcing resource visibility.
Affected context
The issue occurs in deployments exposing the /api/v1/user self routes where public-only tokens are accepted. It becomes risky when authorization checks distinguish token authentication from the permissions required to access private resources, allowing a token with limited public scope to reach data or actions outside that scope.
Exploit preconditions
- Attack surface: The
/api/v1/userself-service API routes - Required access: A valid public-only token or equivalent limited credential
- Trigger point: A request to a self route that references or returns private resources
- Why exploitation is possible: The endpoint authorization logic does not consistently enforce private-resource restrictions for public-only tokens
Why this happens
The underlying bug is an authorization decision that validates the presence or general type of a token without verifying whether its effective permissions cover the requested private resource. This is a form of CWE-863: Incorrect Authorization, where access-control enforcement fails to apply the required policy to a protected operation or resource.
Potential impact
- Attackers may access private user-related resources
- Sensitive account or profile information could be disclosed
- Unauthorized self-service operations may be performed
- Access-control boundaries between public and private data may be weakened
- Exposed information could support further targeted attacks
General mitigation guidance
Mitigation generally focuses on enforcing authorization at every private-resource access decision rather than relying on token presence or route classification.
Common defensive patterns include:
- Apply deny-by-default authorization for private resources
- Validate token scope, audience, subject, and resource ownership together
- Centralize policy checks so all self routes use consistent authorization logic
- Separate public and private resource handling where practical
- Minimize token privileges and issue narrowly scoped credentials
- Avoid returning private fields unless an explicit policy check succeeds
- Log authorization decisions and review anomalous access patterns
How teams detect issues like this
Detection approaches commonly include:
- Static analysis for route handlers that authenticate tokens without checking scopes or resource visibility
- Code review of every
/api/v1/userbranch involving public and private data - Policy tests using public-only tokens against private-resource cases
- API gateway or service policies that deny private-resource access without the required claims
- Integration tests covering token type, ownership, scope, and resource classification combinations
- Monitoring for repeated private-resource requests made with limited tokens

