Summary
Parse Server's readOnlyMasterKey is intended to provide master-level read access while blocking all write operations, but some endpoints incorrectly accept it for mutating actions.
When the readOnlyMasterKey is enabled and known to an attacker, they can create, modify, and delete Cloud Hooks, and start Cloud Jobs, which can be abused for data exfiltration and other unauthorized changes.
Affected context
This vulnerability affects Parse Server deployments that:
- Enable and rely on the
readOnlyMasterKeyfor privileged read-only access - Expose administrative or API endpoints that accept master keys over the network
- Use Cloud Hooks and Cloud Jobs for production workflows or data processing
It manifests where the server's internal authorization checks fail to distinguish between the master key and the readOnlyMasterKey for certain mutating endpoints, allowing unintended write capabilities.
Exploit preconditions
- Attack surface: Parse Server HTTP/HTTPS API endpoints that accept master keys (e.g., management or cloud function endpoints).
- Required access: Knowledge of the
readOnlyMasterKeyvalue; no separate user authentication is required once the key is known. - Trigger point: Sending API requests to affected endpoints (such as Cloud Hooks and Cloud Jobs management) using the
readOnlyMasterKeyin place of the full master key. - Why exploitation is possible: The authorization logic treats the
readOnlyMasterKeyas sufficient for operations that should require full master-level privileges, violating the documented read-only contract and enabling write operations.
Why this happens
The underlying issue is an incorrect authorization implementation where different privilege levels share overlapping access paths.
In this case, the readOnlyMasterKey was introduced as a restricted variant of the master key, but authorization checks for some mutating endpoints do not properly distinguish between keys.
As a result, endpoints that should require the full master key also accept the readOnlyMasterKey for create, update, and delete actions.
This aligns with CWE-863: Incorrect Authorization, where the system fails to enforce the intended security policy for a given identity or credential, granting broader access than specified by design and documentation.
Potential impact
- Attackers with the
readOnlyMasterKeycould create, modify, or delete Cloud Hooks. - Cloud Jobs could be started to read, process, and exfiltrate sensitive data.
- Application behavior could be altered through malicious Cloud Hooks, leading to logic abuse or data integrity issues.
- Auditability and trust in backend automation may be undermined, complicating incident response and forensics.
General mitigation guidance
Mitigation strategies focus on strengthening authorization boundaries and reducing reliance on overly powerful shared secrets:
- Clearly separate keys or tokens by privilege, ensuring that read-only credentials cannot be reused for mutating endpoints.
- Centralize authorization logic so that all endpoints consistently verify the exact privilege level required, rather than checking only for the presence of any master-like key.
- Prefer fine-grained, role-based access controls or scoped API tokens over broad master keys, especially for administrative and automation endpoints.
- Limit exposure of master-level and read-only keys via configuration management, secrets handling, and network segmentation, so they are not accessible from untrusted environments.
- Periodically rotate master-like keys and ensure operational processes treat them as highly sensitive credentials.
How teams detect issues like this
Detection typically involves a combination of code-level review and runtime monitoring:
- Use static analysis or manual review to identify authorization checks that do not differentiate between full master keys and read-only keys, especially around Cloud Hooks and Cloud Jobs management.
- Review access control middleware, decorators, or helper functions to confirm that each endpoint enforces the intended privilege level.
- Implement logging that records which key or credential type was used for administrative operations, then monitor for unexpected usage patterns or anomalous calls to Cloud Hooks and Cloud Jobs endpoints.
- Incorporate automated security testing or policy-as-code rules in CI/CD pipelines to flag endpoints that allow write operations under read-only credentials.

