Summary
A broken object-level authorization flaw in Rancher Manager allows an authenticated non-administrative user to query another user's tokens by supplying a selector for that user. The response may expose token metadata and salted bearer-token hashes, creating a risk of credential analysis and unauthorized access.
Affected context
The issue occurs in Rancher Manager's ext.cattle.io/v1 Token store when authorization filtering is applied to list or watch operations. Deployments are at risk when a non-administrative authenticated user can submit selectors naming resources owned by other users and the service fails to preserve the caller's internal ownership constraint.
Exploit preconditions
- Attack surface: Authenticated Rancher API access to Token store list or watch operations
- Required access: A valid account that is not an administrator
- Trigger point: Supplying a label selector that references another user's token resources
- Why exploitation is possible: The requested selector can cause the service to discard its internal owner filter instead of returning an empty result
Why this happens
The underlying bug is an authorization-filter composition error. A caller-controlled selector is allowed to replace or remove a server-side ownership restriction, causing a resource query to return objects outside the caller's authorized scope.
This behavior maps to CWE-639: Authorization Bypass Through User-Controlled Key, where user-controlled identifiers or selection criteria influence access decisions without reliably enforcing ownership or authorization boundaries.
Potential impact
- Unauthorized users may list or watch other users' token resources
- Token metadata may be disclosed across account boundaries
- Salted bearer-token hashes may be exposed for offline analysis
- Compromised or weakly protected tokens could enable unauthorized API access
- The incident may increase the risk of lateral movement or privilege abuse
General mitigation guidance
Mitigation generally focuses on preserving server-side authorization constraints regardless of caller-supplied selectors.
Common defensive patterns include:
- Apply ownership and authorization filters after processing user-controlled selectors
- Treat caller-provided resource names and labels as narrowing criteria, never as replacements for policy filters
- Return empty results when a requested object is outside the caller's scope
- Separate administrative and non-administrative query paths
- Minimize exposure of token metadata and avoid returning bearer-token material when it is not required
- Use least-privilege roles and short-lived, narrowly scoped tokens
- Add regression tests for cross-user list, watch, and direct-object access
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis and code review checks for user-controlled selectors replacing authorization predicates
- Tests that compare results for same-user and cross-user resource queries
- Review of list and watch handlers for consistent server-side ownership enforcement
- API policy checks that verify non-administrative identities cannot observe resources owned by other users
- Audit-log monitoring for unusual cross-user token enumeration or watch activity
- Automated security testing that exercises object-level authorization across multiple identities

