ApostropheCMS Server-Side Prototype Pollution via apos.util.set
A server-side prototype pollution vulnerability in ApostropheCMS allows an authenticated editor to bypass authorization for all subsequent API requests by polluting Object.prototype via the $pullAll patch operator.
ApostropheCMS versions up to and including 4.30.0 contain a critical server-side prototype pollution vulnerability within the apos.util.set() function. The flaw occurs because the function fails to sanitize properties such as __proto__, constructor, or prototype during path traversal. An authenticated user with editor-level privileges can exploit this by sending a crafted PATCH request utilizing the $pullAll operator to inject malicious properties into the global Object.prototype.
This pollution creates a persistent state within the Node.js process. Specifically, the gadget publicApiCheck() fails to correctly enforce authorization once Object.prototype.publicApiProjection is set, leading to a process-wide bypass for all REST API piece-type endpoints. This allows unauthenticated users to access sensitive data endpoints that would otherwise be restricted, with the effect persisting until the Node.js process is restarted.
Attack Chain
- Attacker obtains valid credentials for an editor-level account on the target ApostropheCMS instance.
- Attacker authenticates to the application to obtain a valid session token via the login API.
- Attacker crafts a PATCH request targeting a document, embedding the
$pullAlloperator in the request body. - The payload uses dot-notation
__proto__.publicApiProjectionto trigger the unsafeapos.util.set()path traversal. - The application backend processes the request and mutates the global
Object.prototype, injectingpublicApiProjection: []. - Future requests from any user, including unauthenticated users, hit the application endpoints.
- The
publicApiCheck()logic evaluates the inherited (polluted)publicApiProjectionproperty, causing the authorization check to skip. - Unauthenticated users retrieve sensitive data from protected REST API endpoints.
Impact
Successful exploitation results in a complete, persistent authorization bypass for all REST API endpoints across the entire Node.js process. This affects multiple sensitive endpoints, including @apostrophecms/user and @apostrophecms/global. Because the pollution resides in the global prototype object, it remains effective for the lifetime of the process, impacting every visitor until a server restart occurs. This vulnerability is applicable in any multi-user deployment where editor-level accounts exist.
Recommendation
- Upgrade ApostropheCMS immediately to a patched version that implements input validation in
apos.util.set()andimplementPatchOperators(). - Deploy web server or WAF rules to inspect PATCH requests for
__proto__,constructor, orprototypestrings within the request body. - Restrict access to API endpoints to known safe IP ranges where possible to mitigate the impact of the bypass.
- Monitor application logs for anomalous PATCH requests containing prototype traversal patterns.
Detection coverage 1
Detect CVE-2026-53609 Exploitation - Prototype Pollution Attempt in PATCH Request
criticalDetects exploitation attempts against ApostropheCMS by identifying prototype manipulation attempts in JSON PATCH bodies.
Detection queries are available on the platform. Get full rules →