/

CVE-2026-27804

Severity:

CRITICAL RISK

(9.1)

Authentication Bypass via Insecure Token Validation

CVE-2026-27804

Analyzed

Vulnerability type

Category:

Authentication Bypass via Insecure Token Validation

CWE:

CWE-327, CWE-345

Impact:

Account Takeover / Authentication Bypass

Severity:

CRITICAL RISK

(9.1)

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's Google authentication flow incorrectly trusted the JWT header and accepted tokens signed with alg: "none", allowing an attacker to forge valid-looking Google ID tokens.

In deployments with Google authentication enabled, an unauthenticated attacker could craft such a token to log in as any user linked to a Google account, without knowing their password or possessing real Google credentials.

Affected context

This vulnerability affects Parse Server deployments that:

  • Have Google authentication enabled for user login or account linking
  • Rely on JSON Web Tokens (JWTs) issued by Google as a proof of identity
  • Use the vulnerable Google authentication adapter that:
  • Trusts the JWT header's alg value instead of enforcing an expected algorithm
  • Uses a custom key-fetching mechanism that does not properly enforce key identity

The risk is present whenever the Parse Server instance is reachable by untrusted clients and Google-based login is exposed as a login method.

Exploit preconditions

  • Attack surface: Public Parse Server endpoint that exposes Google login (web, mobile, or API-based clients).
  • Required access: No prior authentication required; the attacker only needs network access to the Parse Server instance.
  • Trigger point: Submission of a forged Google JWT as part of the Google authentication flow, using alg: "none" and a victim's Google account identifier in the token payload.
  • Why exploitation is possible:
  • The server trusts the algorithm specified in the JWT header instead of enforcing RS256.
  • Tokens with alg: "none" are accepted as valid, skipping cryptographic signature verification.
  • The custom key-fetching logic for Google public keys lacks strict enforcement of key identity, further weakening validation guarantees.

Why this happens

The root cause is an insecure JWT validation design in the Google authentication integration:

  • The implementation relies on claims and metadata in the JWT header (including alg) instead of enforcing a specific, expected signature algorithm (RS256) for Google tokens.
  • This aligns with CWE-345: Insufficient Verification of Data Authenticity, because the server accepts identity assertions (Google JWTs) without ensuring they are cryptographically authentic.
  • The cryptographic misuse aspect also aligns with CWE-327: Use of a Broken or Risky Cryptographic Algorithm, in that the implementation effectively disables signature verification by accepting alg: "none", providing no real cryptographic protection.

Abstractly, the insecure pattern is: trusting attacker-controlled token metadata to decide how (or whether) to verify the token, instead of applying strict, server-side verification policy for issuer, algorithm, and key selection.

Potential impact

  • An attacker can log in as any user whose account is linked to a Google identity, leading to full account takeover.
  • Compromise of application data accessible to the targeted user accounts (personal data, application secrets, resources).
  • Escalation to administrative or privileged roles if any Google-linked users have elevated permissions.
  • Abuse of compromised accounts for further attacks, such as data manipulation, fraudulent actions, or pivoting into other systems integrated with Parse Server.
  • Erosion of trust in Google-based single sign-on mechanisms within the affected environment.

General mitigation guidance

Effective mitigation focuses on enforcing strict token verification policies and minimizing trust in client-provided token metadata:

  • Enforce a fixed, expected algorithm: Configure JWT verification code to require the precise algorithm used by the identity provider (e.g., RS256 for Google), ignoring the alg value in the JWT header.
  • Use vetted verification libraries: Prefer well-maintained libraries (e.g., JOSE/JWT toolkits and JWKS clients) that handle signature verification, key selection, and algorithm whitelisting by default, instead of custom JWT or key-fetching code.
  • Pin issuer and audience: Validate iss and aud claims against strict, server-side configuration to ensure tokens originate from the expected Google endpoint and are intended for your application.
  • Harden key management: Use JWKS-based key resolution that rejects unknown or invalid key identifiers, and cache keys with appropriate expiry and error handling rather than silently falling back to unsafe behavior.
  • Reduce authentication attack surface: Disable unused identity providers, and treat external identity flows as untrusted until fully validated; avoid mixing test and production credentials or endpoints.
  • Apply least privilege in application logic: Design application permissions so that compromise of a single account yields minimal blast radius, with additional checks around admin or highly privileged actions.

How teams detect issues like this

Detection strategies should focus on identifying insecure token validation logic and anomalous authentication behavior:

  • Static analysis and code scanning:
  • Flag uses of JWT libraries where:
  • alg is not explicitly constrained or is taken directly from the token header.
  • Signature verification is optional, disabled, or bypassed.
  • Identify custom HTTP logic for fetching JWKS or public keys instead of using robust libraries, especially when error handling falls back to permissive behavior.
  • Code review signals:
  • Authentication code that:
  • Parses JWTs before verifying signatures.
  • Accepts tokens with alg: "none" or with symmetric algorithms where asymmetric is expected.
  • Does not check issuer (iss) and audience (aud) against configuration.
  • Adapters or plugins that implement their own cryptographic or key management logic when a standard library would suffice.
  • Runtime monitoring and logging:
  • Log authentication attempts with details such as identity provider, user ID, and source IP to detect spikes or unusual patterns (e.g., many different accounts accessed from a single IP).
  • Monitor for successful logins without expected upstream identity provider interactions (e.g., unusual volume of Google logins not reflected in Google's audit logs, if accessible).
  • Security policy enforcement:
  • Integrate automated checks into CI/CD to reject deployments where JWT verification options are insecure or policies (algorithm, issuer, audience) are not explicitly configured.
  • Periodically audit authentication adapters and identity provider integrations as part of security reviews.

Sources

SourceLink
github.comgithub.com/parse-community/parse-server/commit/9b94083accb7f3e72c6b8126c195c7a03dd2dfd7
github.comgithub.com/parse-community/parse-server/commit/9d5942d50e55c822924c27b05aa98f1393e7a330
github.comgithub.com/parse-community/parse-server/releases/tag/8.6.3
github.comgithub.com/parse-community/parse-server/releases/tag/9.3.1-alpha.4
github.comgithub.com/parse-community/parse-server/security/advisories/GHSA-4q3h-vp4r-prv2

Frequently asked

questions

This issue is broadly exploitable in any deployment where Parse Server is reachable by untrusted clients and Google authentication is enabled. An attacker does not need an existing account or special network position—only the ability to send crafted authentication requests.

No. The attacker does not need valid Google credentials or access to Google's systems. They exploit the server's failure to verify token signatures by submitting a forged JWT with alg: "none" and a chosen Google account identifier in the payload.

The safest pattern is to enforce strict, server-side token verification: hardcode the expected algorithm and issuer, validate the audience, and rely on robust JWT/JWKS libraries that refuse tokens with unsupported algorithms or unknown keys. Avoid custom cryptographic or key-handling code wherever possible.

Prevention relies on following secure design principles for token-based authentication: never trust token headers; always enforce an allowlist of algorithms, issuers, and audiences; use mature verification libraries; subject identity provider integrations to focused security review; and add automated tests that confirm invalid or unsigned tokens are rejected.

Find out what's already
exploitable in your codebase.