GHSA-VH56-5M88-39RQ
Vulnerability from github – Published: 2026-10-21 17:15 – Updated: 2026-10-21 17:15Summary
The getOne REST endpoint for pages does not apply viewRole type-level restrictions
or viewPermission field-level redaction. An editor-level user who knows a document
_id can read the full content of admin-only pages and their privileged fields, while
the getAll endpoint correctly enforces both restrictions.
Details
Finding 3 — viewRole bypass:
modules/@apostrophecms/page/index.js exposes getRestQuery(req, omitPermissionCheck =
false). The getAll path calls publicApiCheckAsync and threads the full query builder
pipeline including viewRole filtering. The getOne path uses a divergent code path
that skips this pipeline.
A page type declared with viewRole: 'admin' is inaccessible via GET
/api/v1/@apostrophecms/page?type=secretPage (returns 403 to an editor) but is fully
returned by GET /api/v1/@apostrophecms/page/:id:en:published to the same editor.
Finding 4 — viewPermission field leak:
Fields decorated with viewPermission: { action: 'edit', type: '@apostrophecms/page' }
are stripped by removeForbiddenFields in the getAll path but are returned verbatim
in getOne. An editor who knows any document _id can read all
viewPermission-restricted fields.
PoC
# Log in as editor, get session jar
EDITOR_JAR="..."
# getAll — correctly blocked
curl -b "$EDITOR_JAR" \
"http://TARGET/api/v1/@apostrophecms/page?type=secretPage"
# → 403 Forbidden
# getOne — bypassed, returns full document including viewPermission fields
curl -b "$EDITOR_JAR" \
"http://TARGET/api/v1/@apostrophecms/page/ADMIN_PAGE_ID:en:published"
# → 200 OK, full doc including secretField value
Impact
Editors can read the full content of any page — including those restricted to admins via
viewRole — if they know or can guess the _id. Sensitive field values gated by
viewPermission are also fully exposed. This breaks the content access control model
for any site using these decorators.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "apostrophe"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.34.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-112957"
],
"database_specific": {
"cwe_ids": [
"CWE-862"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-21T17:15:21Z",
"nvd_published_at": "2026-10-20T17:17:33Z",
"severity": "MODERATE"
},
"details": "### Summary\nThe `getOne` REST endpoint for pages does not apply `viewRole` type-level restrictions\nor `viewPermission` field-level redaction. An editor-level user who knows a document\n`_id` can read the full content of admin-only pages and their privileged fields, while\nthe `getAll` endpoint correctly enforces both restrictions.\n\n### Details\n**Finding 3 \u2014 viewRole bypass:**\n`modules/@apostrophecms/page/index.js` exposes `getRestQuery(req, omitPermissionCheck =\nfalse)`. The `getAll` path calls `publicApiCheckAsync` and threads the full query builder\npipeline including `viewRole` filtering. The `getOne` path uses a divergent code path\nthat skips this pipeline.\n\nA page type declared with `viewRole: \u0027admin\u0027` is inaccessible via `GET\n/api/v1/@apostrophecms/page?type=secretPage` (returns 403 to an editor) but is fully\nreturned by `GET /api/v1/@apostrophecms/page/:id:en:published` to the same editor.\n\n**Finding 4 \u2014 viewPermission field leak:**\nFields decorated with `viewPermission: { action: \u0027edit\u0027, type: \u0027@apostrophecms/page\u0027 }`\nare stripped by `removeForbiddenFields` in the `getAll` path but are returned verbatim\nin `getOne`. An editor who knows any document `_id` can read all\n`viewPermission`-restricted fields.\n\n### PoC\n```bash\n# Log in as editor, get session jar\nEDITOR_JAR=\"...\"\n\n# getAll \u2014 correctly blocked\ncurl -b \"$EDITOR_JAR\" \\\n \"http://TARGET/api/v1/@apostrophecms/page?type=secretPage\"\n# \u2192 403 Forbidden\n\n# getOne \u2014 bypassed, returns full document including viewPermission fields\ncurl -b \"$EDITOR_JAR\" \\\n \"http://TARGET/api/v1/@apostrophecms/page/ADMIN_PAGE_ID:en:published\"\n# \u2192 200 OK, full doc including secretField value\n```\n\n### Impact\nEditors can read the full content of any page \u2014 including those restricted to admins via\n`viewRole` \u2014 if they know or can guess the `_id`. Sensitive field values gated by\n`viewPermission` are also fully exposed. This breaks the content access control model\nfor any site using these decorators.",
"id": "GHSA-vh56-5m88-39rq",
"modified": "2026-10-21T17:15:21Z",
"published": "2026-10-21T17:15:21Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-vh56-5m88-39rq"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-112957"
},
{
"type": "WEB",
"url": "https://github.com/apostrophecms/apostrophe/commit/06e4b377f3c360f9e89c32dccd7e505ad5ddf498"
},
{
"type": "WEB",
"url": "https://github.com/apostrophecms/apostrophe/commit/40b989b1a9dd23d30029b8ce7668634265cfe5ea"
},
{
"type": "PACKAGE",
"url": "https://github.com/apostrophecms/apostrophe"
},
{
"type": "WEB",
"url": "https://github.com/apostrophecms/apostrophe/releases/tag/apostrophe@4.34.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "ApostropheCMS: GET /api/v1/@apostrophecms/page/:id bypasses viewRole restriction and exposes viewPermission-gated fields to lower-privileged users"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.