/

CVE-2026-54320

Severity:

HIGH RISK

(8.4)

Improper OIDC Email Verification (CWE-287) in Daytona

CVE-2026-54320

Deferred

Vulnerability type

Category:

Authentication and Authorization Logic Error

CWE:

CWE-287, CWE-863

Impact:

Unauthorized Organization Membership and Role Escalation

Severity:

HIGH RISK

(8.4)

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

An authentication logic flaw in Daytona allows organization invitations to be accepted or declined by users whose email address matches the invite target but has not been verified.

On OIDC providers that grant sessions before email verification, an attacker can self-register an unverified account with the invited email and join the target organization with the role assigned in the invitation.

Affected context

This issue arises in Daytona deployments that use OIDC identity providers where users can self-sign up and receive a valid session token before verifying their email address.

The vulnerable behavior occurs in the organization invitation acceptance and decline flows, which match the email claim in the OIDC token to the invitation target but fail to require that the email be marked as verified.

Environments that rely on invitations to grant high-privilege roles (e.g., Owner) are particularly exposed when invitations remain pending and can be matched by unverified accounts.

Exploit preconditions

  • Attack surface: Organization invitation acceptance and decline endpoints exposed to authenticated OIDC sessions.
  • Required access: Ability to create or obtain an OIDC-authenticated session with an email claim matching a pending invitation, without needing that email to be verified.
  • Trigger point: Calling the invitation accept (or decline) API while holding a token that contains the same email string as the invitation target.
  • Why exploitation is possible: The application trusts the email claim in the OIDC token for invitation matching but does not enforce the email_verified (or equivalent) flag, allowing unverified identities to assume invited roles.

Why this happens

The underlying bug class is an authentication and authorization logic error where identity verification requirements are inconsistent across different workflows.

Daytona correctly enforces email verification during organization creation, but the invitation acceptance and decline paths only validate that the caller's email string matches the target of the invitation, ignoring whether the identity has been verified by the IdP.

This maps to CWE-287 (Improper Authentication) and CWE-863 (Incorrect Authorization) because the system treats possession of an unverified OIDC session as sufficient proof of identity and authorization to join an organization with a potentially privileged role.

Potential impact

  • An attacker may join a target organization without completing email verification.
  • An attacker could obtain elevated roles (including Owner) within the organization via misused invitations.
  • Unauthorized access to projects, agent workflows, and AI-runtime configurations can occur.
  • Attackers may change organization settings, invite additional accounts, or modify access controls.
  • Compromise of sensitive data processed or stored within the Daytona environment could result.

General mitigation guidance

Effective mitigation focuses on enforcing consistent identity verification and tightening authorization checks around invitation workflows.

Common defensive patterns include:

  • Requiring a verified email (or equivalent strong identity attribute) before any invitation-related action, not just during organization creation.
  • Explicitly checking the IdP's email_verified flag or analogous claim for all flows that rely on email-based matching.
  • Treating invitation acceptance as a privileged action and implementing explicit authorization rules, including role and organization membership checks.
  • Avoiding sole reliance on mutable, self-asserted identifiers (like unverified email claims) for security decisions; prefer stable, verified subject identifiers where possible.
  • Applying least-privilege principles to invited roles and separating high-privilege invitations from automated or self-service signup paths.

How teams detect issues like this

Detection can focus on identifying inconsistent authentication and authorization patterns tied to email verification.

Helpful strategies include:

  • Static analysis or code review to ensure all flows that depend on user identity enforce verification and use consistent checks (e.g., email_verified claim handling).
  • Reviewing authorization logic to confirm that role assignment via invitations requires both a verified identity and explicit organization membership validation.
  • Monitoring audit logs for invitation acceptances by users whose email status is unverified or recently created, especially for high-privilege roles.
  • Implementing policy-based checks in CI/CD pipelines that flag routes performing security-sensitive actions based only on unverified identifiers.

Sources

SourceLink
github.comgithub.com/daytonaio/daytona/security/advisories/GHSA-m6hx-cffh-3f3h

Frequently asked

questions

Exploitability depends on the identity provider configuration. It is most relevant where users can obtain valid OIDC sessions before email verification and where organizations use email-based invitations for access control.

An attacker only needs to self-register or otherwise obtain an OIDC-authenticated session whose email claim matches the target of a pending invitation; they do not need to verify the email to exploit the flaw.

The safest fix is to enforce verified identity attributes for all invitation-related actions, ensuring that any flow which relies on email matching also requires email verification and consistent authorization checks before granting membership or roles.

Use a uniform authentication and authorization layer that treats identity verification as a mandatory prerequisite for all sensitive operations, rely on stable subject identifiers rather than unverified claims, and regularly review invitation and role-assignment logic for consistency with least-privilege and defense-in-depth principles.

Find out what's already
exploitable in your codebase.