{"schema":"threatline.record/2","record":{"id":"CVE-2026-112957","aliases":["GHSA-vh56-5m88-39rq"],"summary":"ApostropheCMS: GET /api/v1/@apostrophecms/page/:id bypasses viewRole restriction and exposes viewPermission-gated fields to lower-privileged users","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 — 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: 'admin'` 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 — viewPermission field leak:**\nFields decorated with `viewPermission: { action: 'edit', type: '@apostrophecms/page' }`\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 — correctly blocked\ncurl -b \"$EDITOR_JAR\" \\\n  \"http://TARGET/api/v1/@apostrophecms/page?type=secretPage\"\n# → 403 Forbidden\n\n# getOne — bypassed, returns full document including viewPermission fields\ncurl -b \"$EDITOR_JAR\" \\\n  \"http://TARGET/api/v1/@apostrophecms/page/ADMIN_PAGE_ID:en:published\"\n# → 200 OK, full doc including secretField value\n```\n\n### Impact\nEditors can read the full content of any page — including those restricted to admins via\n`viewRole` — 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.","categories":["Libraries & packages"],"product":"apostrophe","vendor":"apostrophecms","ecosystem":"npm","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-vh56-5m88-39rq","source_modified_at":"2026-10-21T17:15:22Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"apostrophe"},"range":"< 4.34.0"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-112957","source_modified_at":"2026-10-21T15:53:52.415Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"apostrophe","vendor":"apostrophecms","versions":[{"version":"< 4.34.0","status":"affected"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-vh56-5m88-39rq","source_modified_at":"2026-10-21T17:28:22.096678767Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"apostrophe","purl":"pkg:npm/apostrophe"},"ranges":[{"events":[{"introduced":"0"},{"fixed":"4.34.0"}],"type":"SEMVER"}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-vh56-5m88-39rq","source_modified_at":"2026-10-21T17:15:22Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"apostrophe"},"version":"4.34.0"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-vh56-5m88-39rq","source_modified_at":"2026-10-21T17:28:22.096678767Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"apostrophe","purl":"pkg:npm/apostrophe"},"version":"4.34.0"}],"cvss":4.3,"severity":"Medium","kev":{"listed":false},"epss":{"probability":0.00251,"percentile":0.15534,"score_date":"2026-10-23"},"published_at":"2026-10-20T16:02:17.803Z","modified_at":"2026-10-21T17:28:22.096678767Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-vh56-5m88-39rq","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-21T17:15:22Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-112957","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-10-21T15:53:52.415Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-vh56-5m88-39rq","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-21T17:28:22.096678767Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-112957","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-vh56-5m88-39rq","tags":["x_refsource_CONFIRM"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-112957","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/apostrophecms/apostrophe/commit/06e4b377f3c360f9e89c32dccd7e505ad5ddf498","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/apostrophecms/apostrophe/commit/40b989b1a9dd23d30029b8ce7668634265cfe5ea","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/apostrophecms/apostrophe/releases/tag/apostrophe@4.34.0","tags":["x_refsource_MISC"]},{"url":"https://github.com/advisories/GHSA-vh56-5m88-39rq","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"none","automatable":"no","technical_impact":"partial","assessed_at":"2026-10-21T14:24:33.421058Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-21T17:28:22.096678767Z","content_hash":"b411800f64a76a6234401fef2065215132409cc3e5b8f9e4dc0eca470eacaac7"}}
