/

CVE-2026-30229

Severity:

HIGH RISK

(7.2)

Authorization Bypass in Parse Server /loginAs Endpoint

CVE-2026-30229

Analyzed

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-863

Impact:

Privilege Escalation and User Impersonation

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Parse Server contains an authorization flaw where the readOnlyMasterKey can invoke the POST /loginAs endpoint to obtain a valid session token for any user.

When this occurs, a credential that is intended to be read-only can impersonate arbitrary users and gains full read and write access to their data, undermining separation of privileges in affected deployments.

Affected context

This vulnerability affects Parse Server deployments that:

  • Are running versions prior to 8.6.6 or 9.5.0-alpha.4
  • Have the readOnlyMasterKey configured and in active use
  • Expose the /loginAs endpoint as part of their API surface

In these environments, the readOnlyMasterKey is treated as sufficiently privileged to call POST /loginAs, even though it is intended to be constrained to read-only operations.

Exploit preconditions

  • Attack surface: Application API, specifically the POST /loginAs endpoint.
  • Required access: Knowledge and use of the readOnlyMasterKey value (e.g., from misconfigured backend, logs, client-side exposure, or insider access).
  • Trigger point: Sending a crafted POST /loginAs request authenticated with the readOnlyMasterKey targeting a chosen user.
  • Why exploitation is possible: The authorization layer does not properly distinguish between full master key privileges and read-only privileges for the /loginAs operation, allowing a read-only credential to perform a state-changing impersonation action.

Why this happens

The core issue is an authorization design flaw in how Parse Server evaluates credentials against sensitive operations.

The readOnlyMasterKey is intended to enforce a strictly read-only permission set, but the /loginAs endpoint treats it as sufficiently privileged to create session tokens for arbitrary users.

This maps to CWE-863: Incorrect Authorization, where authorization checks do not correctly enforce the separation between different privilege levels, resulting in a lower-privileged key being able to perform higher-privileged actions.

Abstractly, this pattern appears whenever a supposedly constrained API credential (e.g., "read-only", "analytics-only") is able to access functionality that mutates state or escalates privileges because role/permission checks are incomplete or inconsistent.

Potential impact

  • An attacker with access to the readOnlyMasterKey could impersonate any user via /loginAs.
  • Full read and write access to the data of impersonated users, including personal information or application secrets stored in user data.
  • Bypass of normal access controls and ACLs enforced at the user level.
  • Undermining of audit trails and accountability, since actions appear to originate from victim user accounts.
  • Potential chaining with other vulnerabilities or misconfigurations to further escalate access within the environment.

General mitigation guidance

Mitigation generally focuses on hardening authorization boundaries around privileged API keys and sensitive endpoints:

  • Ensure that "read-only" or restricted keys are consistently enforced as such across all endpoints, especially those that can alter authentication state or create sessions.
  • Apply explicit, fine-grained permission checks per endpoint, avoiding implicit assumptions that any master-level key can perform all operations.
  • Separate duties for keys and roles: introduce distinct capabilities for administrative operations (like user impersonation) that require explicit use of a high-privilege credential or out-of-band administrative channel.
  • Reduce exposure of master keys by confining them to trusted backend services and avoiding client-side or loosely controlled environments.
  • Regularly rotate master and read-only keys and limit their scope using configuration, network segmentation, and access control policies.

How teams detect issues like this

Detection efforts can focus on both code-level review and runtime telemetry:

  • Code review and design analysis:
  • Examine authorization logic for privileged endpoints (e.g., login-as, admin operations) to ensure they explicitly differentiate between master and read-only or scoped keys.
  • Look for patterns where multiple keys/roles are funneled through shared authorization code paths without explicit permission branching.
  • Flag any endpoints that can create session tokens, modify ACLs, or impersonate users for heightened scrutiny.
  • Static analysis and automated checks:
  • Use policy-based code scanning or linting rules that require explicit permission checks for sensitive routes and disallow broad "any master key" conditions.
  • Integrate automated tests that assert read-only credentials cannot perform write or impersonation actions.
  • Runtime monitoring and logging:
  • Log all /loginAs calls with information about the type of credential used and the target user ID.
  • Set alerts for anomalous patterns, such as a read-only context invoking impersonation endpoints or sudden spikes in impersonation activity.

Sources

SourceLink
github.comgithub.com/parse-community/parse-server/releases/tag/8.6.6
github.comgithub.com/parse-community/parse-server/releases/tag/9.5.0-alpha.4
github.comgithub.com/parse-community/parse-server/security/advisories/GHSA-79wj-8rqv-jvp5

Frequently asked

questions

Yes, if an attacker can obtain or guess the readOnlyMasterKey and reach the Parse Server API, they can remotely call POST /loginAs to impersonate users.

The attacker needs access to the readOnlyMasterKey. This could stem from misconfigured clients embedding the key, exposed configuration, logs, insider threats, or other security weaknesses that reveal the key.

Correct the authorization logic so that the readOnlyMasterKey cannot perform any state-changing actions, including user impersonation, and enforce explicit privilege separation for sensitive administrative endpoints such as /loginAs.

Adopt a strict access-control model where each endpoint declares required permissions, implement defense-in-depth checks for privileged operations, avoid overloading single keys with multiple roles, and regularly test that scoped or read-only credentials cannot perform write, impersonation, or session-creation actions.

Find out what's already
exploitable in your codebase.