Skip to content
Heist/ feed
Back to feed
MediumFix available

ApostropheCMS: Unauthenticated publicApiProjection bypass via search and sort query builders in the public REST API

Type: advisorySources: OSV

### Summary ApostropheCMS lets a module expose an anonymous read API by setting `publicApiProjection`, which whitelists the document fields unauthenticated callers may see. The public REST GET handler applies every launderable query builder from the query string *before* forcing that projection. Two of those builders, `search` and `sort`, operate on the underlying documents rather than the projected output, and neither is checked against the projection. An unauthenticated attacker can therefore: - use `?search=` as a **value oracle** to confirm and locate documents by the content of a field the projection was meant to hide, and - use `?sort[hiddenField]=1` as an **ordering oracle** to rank documents by a hidden field's value. This is the same confidentiality-bypass class already patched for the `choices`/`counts` builders (gated by `choicesFieldAllowedByProjection`). That gate was never applied to `search` or `sort`. ### Details For an anonymous caller, `getRestQuery` (piece types: `modules/@apostrophecms/piece-type/index.js:1142`; pages: `modules/@apostrophecms/page/index.js`) does: ```js const query = self.find(req).attachments(true); query.applyBuildersSafely(req.query); // (1) apply ALL launderable builders from the query string ... query.project({ ...self.options.publicApiProjection, cacheInvalidatedAt: 1 }); // (2) force read projection query.set('publicApiProjection', self.options.publicApiProjection); // (3) used only by the choices/counts gate ``` `applyBuildersSafel

Products
apostrophe
Affected versions
Not specified
Fixed versions
4.34.0
CVEs
CVE-2026-112954
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 15:24 UTC · Revision 1

Source evidence

ApostropheCMS: Unauthenticated publicApiProjection bypass via search and sort query builders in the public REST API

core-osv · Original source

Published 21 Oct 2026, 17:12 UTC

### Summary ApostropheCMS lets a module expose an anonymous read API by setting `publicApiProjection`, which whitelists the document fields unauthenticated callers may see. The public REST GET handler applies every launderable query builder from the query string *before* forcing that projection. Two of those builders, `search` and `sort`, operate on the underlying documents rather than the projected output, and neither is checked against the projection. An unauthenticated attacker can therefore: - use `?search=` as a **value oracle** to confirm and locate documents by the content of a field the projection was meant to hide, and - use `?sort[hiddenField]=1` as an **ordering oracle** to rank documents by a hidden field's value. This is the same confidentiality-bypass class already patched for the `choices`/`counts` builders (gated by `choicesFieldAllowedByProjection`). That gate was never applied to `search` or `sort`. ### Details For an anonymous caller, `getRestQuery` (piece types: `modules/@apostrophecms/piece-type/index.js:1142`; pages: `modules/@apostrophecms/page/index.js`) does: ```js const query = self.find(req).attachments(true); query.applyBuildersSafely(req.query); // (1) apply ALL launderable builders from the query string ... query.project({ ...self.options.publicApiProjection, cacheInvalidatedAt: 1 }); // (2) force read projection query.set('publicApiProjection', self.options.publicApiProjection); // (3) used only by the choices/counts gate ``` `applyBuildersSafel

osv:GHSA-rqgm-cfrp-4hx8

apostrophe

Fixed versions: 4.34.0

Complete source record
{
  "id": "3a360c0381500a6a4f7ab8af06bcad685c783fafd5bcfb8f20a6e609ac7fec09",
  "url": "https://osv.dev/vulnerability/GHSA-rqgm-cfrp-4hx8",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ApostropheCMS: Unauthenticated publicApiProjection bypass via search and sort query builders in the public REST API",
    "summary": "### Summary ApostropheCMS lets a module expose an anonymous read API by setting `publicApiProjection`, which whitelists the document fields unauthenticated callers may see. The public REST GET handler applies every launderable query builder from the query string *before* forcing that projection. Two of those builders, `search` and `sort`, operate on the underlying documents rather than the projected output, and neither is checked against the projection. An unauthenticated attacker can therefore: - use `?search=` as a **value oracle** to confirm and locate documents by the content of a field the projection was meant to hide, and - use `?sort[hiddenField]=1` as an **ordering oracle** to rank documents by a hidden field's value. This is the same confidentiality-bypass class already patched for the `choices`/`counts` builders (gated by `choicesFieldAllowedByProjection`). That gate was never applied to `search` or `sort`. ### Details For an anonymous caller, `getRestQuery` (piece types: `modules/@apostrophecms/piece-type/index.js:1142`; pages: `modules/@apostrophecms/page/index.js`) does: ```js const query = self.find(req).attachments(true); query.applyBuildersSafely(req.query); // (1) apply ALL launderable builders from the query string ... query.project({ ...self.options.publicApiProjection, cacheInvalidatedAt: 1 }); // (2) force read projection query.set('publicApiProjection', self.options.publicApiProjection); // (3) used only by the choices/counts gate ``` `applyBuildersSafel",
    "evidence": "osv:GHSA-rqgm-cfrp-4hx8",
    "products": [
      {
        "name": {
          "value": "apostrophe",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.34.0",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "GHSA-rqgm-cfrp-4hx8",
      "aliases": [
        "CVE-2026-112954",
        "GHSA-rqgm-cfrp-4hx8"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "4.34.0"
                }
              ]
            }
          ],
          "package": {
            "name": "apostrophe",
            "purl": "pkg:npm/apostrophe",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-rqgm-cfrp-4hx8/GHSA-rqgm-cfrp-4hx8.json"
          }
        }
      ],
      "modified": "2026-10-21T17:15:08.640805945Z",
      "provider": "osv",
      "references": [
        "https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-rqgm-cfrp-4hx8",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-112954",
        "https://github.com/apostrophecms/apostrophe/commit/06e4b377f3c360f9e89c32dccd7e505ad5ddf498",
        "https://github.com/apostrophecms/apostrophe/commit/40b989b1a9dd23d30029b8ce7668634265cfe5ea",
        "https://github.com/apostrophecms/apostrophe",
        "https://github.com/apostrophecms/apostrophe/releases/tag/apostrophe@4.34.0"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-200"
        ],
        "severity": "MODERATE",
        "github_reviewed": true,
        "nvd_published_at": "2026-10-20T16:17:06Z",
        "github_reviewed_at": "2026-10-21T17:12:15Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-112954",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 397038,
  "published_at": "2026-10-21T17:12:15+00:00"
}