
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-39857 is an information disclosure vulnerability in ApostropheCMS, an open-source Node.js content management system, where the choices and counts REST API query parameters bypass publicApiProjection field restrictions. Affecting versions 4.28.0 and prior, the flaw allows unauthenticated attackers to extract distinct field values from any schema field with a registered query builder, including fields explicitly excluded from the public API projection. It was published on April 15, 2026, with a patch released in version 4.29.0. The vulnerability carries a CVSS v3.1 base score of 5.3 (Medium) (Github Advisory, Security Advisory).
The root cause (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) lies in how the choices and counts query builders are processed before the publicApiProjection MongoDB projection is applied. Specifically, getRestQuery calls applyBuildersSafely(req.query) first, which processes the choices and counts parameters; the projection is only applied afterward on the main query. The toDistinct method then executes db.distinct(property, criteria) — a MongoDB operation that inherently ignores projections — and the results are returned directly in the API response without filtering through publicApiProjection or removeForbiddenFields. This affects all schema field types with registered query builders (string, integer, float, select, boolean, date, slug, relationship), and the same bypass applies to viewPermission-protected fields since removeForbiddenFields only processes toArray() results. Both the piece-type REST API (piece-type/index.js:292-296) and page REST API (page/index.js:371-376) are affected (Security Advisory, Patch Commit).
An unauthenticated remote attacker can enumerate all distinct values of any schema field — including those explicitly excluded from the public API projection and those protected by viewPermission role-based access controls. The counts variant additionally discloses how many documents hold each distinct value, revealing statistical information about the dataset. While integrity and availability are unaffected, the confidentiality impact includes exposure of sensitive CMS data such as internal status values, priority levels, internal categories, and restricted content fields across all piece types and pages with a configured publicApiProjection (Github Advisory).
A proof-of-concept exploit is publicly available in the GitHub security advisory, consisting of simple curl commands requiring no authentication or special tooling. There is no evidence of in-the-wild exploitation at this time, and the vulnerability has not been added to the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.031% (9th percentile), indicating a low near-term exploitation probability. No threat actor attribution has been reported (Security Advisory, Github Advisory).
/api/v1/<piece-type>) that return results, indicating publicApiProjection is configured.curl -s 'http://target:3000/api/v1/article') to confirm the API is public and identify which fields appear in normal responses.choices: Send a request with the choices query parameter specifying a field name not present in the normal API response:curl -s 'http://target:3000/api/v1/article?choices=status' | python3 -m json.toolThe response will include all distinct values for the status field (e.g., draft, published) even though it is excluded from the projection.counts: Use the counts parameter to also reveal how many documents have each distinct value:curl -s 'http://target:3000/api/v1/article?counts=priority' | python3 -m json.toolcurl -s 'http://target:3000/api/v1/article?choices=status,priority,internalNotes'viewPermission restrictions, as these are equally exposed through this bypass (Security Advisory)./api/v1/<piece-type> endpoints containing choices= or counts= query parameters with field names not normally used in UI filtering; repeated enumeration of multiple field names across requests from the same source IP.GET /api/v1/article?choices=status, GET /api/v1/article?counts=priority, or GET /api/v1/article?choices=status,priority,internalNotes from unauthenticated sessions; high volume of such requests from a single IP suggesting automated enumeration.choices or counts keys with values for fields not included in the configured publicApiProjection, observable in application-level logging if response bodies are captured (Security Advisory).The primary remediation is to upgrade ApostropheCMS to version 4.29.0, which introduces choicesFieldAllowedByProjection and choicesFieldAllowedByViewPermission checks in the choices builder's after handler to enforce field-level access controls before returning distinct values (Patch Commit). If immediate patching is not feasible, consider restricting network-level access to the REST API endpoints or requiring authentication for all API access as a temporary workaround. Organizations should also audit their publicApiProjection configurations to understand which sensitive fields may have been exposed (Github Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."