Summary
Penpot contains a critical authentication flaw where invitation handling and session creation logic allow account takeover without password verification.
By abusing exposed invitation tokens and weak registration checks, a registered user could assume control of any non-blocked profile whose email they can target.
Affected context
This vulnerability arises in Penpot's authentication and invitation flow, specifically in the logic handling team invitations and profile registration.
It affects deployments where:
- Invitation tokens created by
create-team-invitationscan be accessed or inferred by users, - The registration flow (
prepare-register-profile/register-profile) ties invitations to existing profile identifiers, - Session issuance after registration is driven primarily by invitation email matching rather than full credential validation.
Under these conditions, registered users can leverage the flawed flow to gain control over other non-blocked profiles.
Exploit preconditions
- Attack surface: Penpot web application authentication and invitation endpoints.
- Required access: A valid, registered Penpot user account; ability to trigger or access team invitation flows.
- Trigger point: Use of invitation tokens to register or bind a profile, followed by automatic session issuance based on email match.
- Why exploitation is possible: The registration logic implicitly trusts invitation email matches and exposed invitation tokens, and issues authenticated sessions without independently verifying ownership of the existing profile (e.g., via password or a separate proof-of-control). This combines aspects of CWE-287 (Improper Authentication) and CWE-639 (Insecure Direct Object Reference to another user's account).
Why this happens
At its core, the bug stems from treating an invitation token and email match as sufficient proof of identity, bypassing robust authentication guarantees.
The prepare-register-profile path embeds an existing profile identifier into the registration flow, effectively allowing a user to target another profile.
The register-profile logic then issues a session when the invitation email matches, without enforcing password checks or an independent verification step.
This represents CWE-287: Improper Authentication, since the system accepts weak evidence (invitation/email) instead of a strong secret, and CWE-639: Insecure Direct Object Reference, because the registration flow lets a user bind themselves to and log in as another profile by referencing its identifier indirectly through the invitation mechanism.
Potential impact
- A registered user could take over any non-blocked profile associated with a targeted invitation email.
- Attackers may gain access to private design projects, teams, and collaboration spaces.
- Compromised accounts can be used to exfiltrate sensitive design assets and associated metadata.
- Malicious changes to shared design content could disrupt workflows or introduce integrity issues in downstream code and assets.
- Elevated access via hijacked profiles may enable further privilege escalation or social engineering within shared workspaces.
General mitigation guidance
Effective mitigation focuses on tightening identity verification and isolating invitation logic from account ownership checks.
Common defensive patterns include:
- Treat invitations as a way to prove possession of an email address only, not as authorization to assume control of an existing profile.
- Require full authentication (password, SSO, or equivalent factor) before linking any account or session to a profile, even when an invitation is present.
- Avoid embedding persistent or sensitive identifiers for existing profiles in invitation flows; use opaque, scoped, and time-limited tokens that map server-side to permissible actions.
- Ensure session creation is always tied to a previously authenticated principal, not inferred strictly from invitation data.
- Enforce least-privilege semantics on invitations, so they can grant access to a resource (like a team) but not transfer or override account ownership.
How teams detect issues like this
Detection generally involves reviewing both code and runtime behavior around authentication and invitations:
- Static analysis / code review:
- Search for paths where sessions or authentication states are created based on invitation tokens, email matches, or other non-secret attributes.
- Flag flows where existing profile IDs are passed to registration or invitation handlers and used to select accounts without a prior, validated login.
- Identify any bypasses where password verification or SSO checks are conditionally skipped when an invitation is present.
- Policy and architectural checks:
- Enforce design reviews for any feature that can create or claim user accounts, ensuring separation between "invite to resource" and "own the account."
- Use automated security tests or dynamic analysis to simulate invitation-based account creation and verify that account takeover is not possible.
- Operational monitoring:
- Monitor for suspicious patterns such as frequent profile switches or new sessions issued shortly after invitation use from the same client IP/user.

