---
id: CVE-2026-113669
aliases:
  - GHSA-hhvr-8m24-qqr3
title: 'ApostropheCMS: Cross-domain session token in URL confers session takeover'
summary: 'ApostropheCMS: Cross-domain session token in URL confers session takeover'
severity: medium
cvss: 5.3
cwe:
  - CWE-598
vendor: apostrophe
product: apostrophe
ecosystem: npm
affected:
  - apostrophe < 4.33.0
  - '@apostrophecms/passport-bridge < 1.6.1'
patched:
  - apostrophe 4.33.0
  - '@apostrophecms/passport-bridge 1.6.1'
published: '2026-10-20'
updated: '2026-10-20'
sourceUpdated: '2026-10-20T18:09:02Z'
source: GHSA
sourceUrl: 'https://github.com/advisories/GHSA-hhvr-8m24-qqr3'
references:
  - url: >-
      https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-hhvr-8m24-qqr3
  - url: 'https://github.com/advisories/GHSA-hhvr-8m24-qqr3'
  - url: >-
      https://github.com/apostrophecms/apostrophe/commit/9500b8b0e1d630d5e07fbb5fd2c25ed0943845ce
    label: >-
      https://github.com/apostrophecms/apostrophe/commit/9500b8b0e1d630d5e07fbb5fd2c25ed0943845ce
  - url: >-
      https://github.com/apostrophecms/apostrophe/commit/f84fd41cbf6c22eb8d0008fc9c25df1f7130b350
    label: >-
      https://github.com/apostrophecms/apostrophe/commit/f84fd41cbf6c22eb8d0008fc9c25df1f7130b350
  - url: 'https://github.com/apostrophecms/apostrophe/releases/tag/apostrophe@4.33.0'
    label: 'https://github.com/apostrophecms/apostrophe/releases/tag/apostrophe@4.33.0'
tags:
  - ghsa
  - npm
  - cve.org
cvssVector: 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N'
cvssSource: cna
ingestedAt: '2026-10-20T18:14:37.212Z'
---

## Overview

**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/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

- `apostrophe < 4.33.0`
- `@apostrophecms/passport-bridge < 1.6.1`

## Remediation

Upgrade to a patched release:

- `apostrophe 4.33.0`
- `@apostrophecms/passport-bridge 1.6.1`
