Summary
A flaw in XO REST cookie parsing can cause an authentication token to be treated as an object rather than a string. When the token lookup interprets that object as an unfiltered query, an unauthenticated requester may be authenticated as the owner of an unexpired token and obtain reusable token IDs.
Affected context
The issue affects XO REST authentication flows in versions prior to 6.9.2 and 6.10.1. It occurs when cookie parsing accepts a non-string authentication token and the token provider passes that value to a collection lookup without enforcing its expected type. The authenticated /rest/v0/users/me/authentication_tokens route can then expose reusable login token IDs.
Exploit preconditions
- Attack surface: The XO REST API must be reachable.
- Required access: No valid credentials are required to trigger the authentication parsing behavior.
- Trigger point: REST authentication processes a cookie whose parsed token value is not a string.
- Why exploitation is possible: The token collection can treat an object value as an unfiltered lookup and return its first token; if that token is unexpired, the provider may authenticate as its owner.
- Follow-on condition: The attacker can access the authenticated token-listing route to obtain reusable token IDs.
Why this happens
The authentication flow does not enforce the expected string type for a token received through cookie parsing. The resulting object reaches a token lookup that interprets it as an absent or unfiltered query, allowing an existing token to be selected. This is an authentication-bypass weakness (CWE-287) enabled by inadequate input type validation (CWE-1287). The underlying insecure pattern is trusting loosely parsed authentication data without validating its type and semantics at the security boundary.
Potential impact
- An unauthenticated attacker may gain access as the owner of a selected unexpired token.
- An attacker could retrieve reusable login token IDs.
- Compromised tokens may enable persistent or repeated unauthorized access.
- Depending on the token owner's privileges, an attacker may access sensitive infrastructure data or perform administrative actions.
General mitigation guidance
Defensive approaches focus on strict validation at authentication boundaries:
- Require authentication tokens to be strings and reject values of any other type.
- Ensure token lookups use explicit, validated identifiers and cannot fall back to unfiltered queries.
- Fail closed when parsing, validation, or token resolution encounters unexpected input.
- Limit the privileges and lifetime of authentication tokens, and restrict access to token-management routes.
- Reduce trust in client-controlled cookies through consistent parsing and server-side validation.
How teams detect issues like this
- Review cookie parsing and authentication code for implicit type coercion or acceptance of non-string token values.
- Use static analysis and code review to identify token lookups that can become unfiltered when given null, object, or malformed input.
- Enforce API schemas and runtime policies requiring authentication credentials to have explicit types and formats.
- Monitor authentication and token-management logs for anomalous unauthenticated access, unexpected token selection, or unusual requests to
/rest/v0/users/me/authentication_tokens. - Automated security review tools may help flag unsafe parsing and lookup patterns.

