Summary
Vendure can associate a newly presented external authentication identity with an existing customer account based only on an email address, even when the external provider has not verified ownership of that address. In affected deployments, an attacker may use a custom authentication strategy to access a victim's account, view private data, change account details, or place orders.
Affected context
The issue occurs in Vendure deployments that use a custom external AuthenticationStrategy and pass email addresses that the identity provider has not confirmed as verified. The risk arises when an existing customer is selected by email and the unverified external identity is attached to that account. Native email-and-password deployments, as well as external strategies that require provider-verified email ownership, are generally outside this affected context.
Exploit preconditions
- Attack surface: External authentication integration in a Vendure deployment
- Required access: An attacker needs to authenticate through an accepted external identity provider or custom authentication strategy
- Trigger point: Customer and user association during external authentication
- Required condition: The strategy forwards an attacker-controlled or otherwise unverified email address matching an existing customer's email
- Why exploitation is possible: Account linking relies on email matching without requiring verified ownership before attaching the external authentication method
Why this happens
The vulnerability results from treating an externally supplied email address as sufficient proof of account ownership during identity linking. When the application selects an existing customer by email and attaches a new authentication method without checking that the provider has verified the address, an untrusted identity claim can become an authenticated session for another user's account. This behavior maps to CWE-287: Improper Authentication, because the system fails to adequately validate the identity assertion used to authorize access.
Potential impact
- An attacker may take over an existing customer account
- The attacker could access orders, addresses, and personal information
- Account credentials, profile details, or other settings may be changed
- Unauthorized orders could be placed as the victim
- Administrative or business workflows could be affected if compromised accounts have elevated privileges
General mitigation guidance
Mitigation generally focuses on requiring strong proof of identity before linking an external authentication method to an existing account.
Common defensive patterns include:
- Require the external identity provider to assert verified email ownership before email-based account linking
- Treat provider email claims as untrusted unless their verification status is explicitly validated
- Use a separate account-linking confirmation flow requiring authentication to the existing account
- Avoid automatically merging identities solely because email addresses match
- Apply least privilege to external authentication strategies and limit their account-management capabilities
- Record and review authentication-method linking events for suspicious activity
These controls reduce the chance that an unverified external identity can inherit an existing account's privileges.
How teams detect issues like this
Organizations can assess for this issue through:
- Static analysis and code review checks for account lookup followed by authentication-method attachment based only on email
- Review of custom AuthenticationStrategy implementations for enforcement of provider email-verification claims
- Tests covering mismatched, unverified, and attacker-controlled external email addresses
- Policy checks requiring explicit identity proof before linking external accounts
- Monitoring for new authentication methods attached to existing customer accounts, especially shortly before unusual orders or profile changes
Automated application-security testing and code review tools may help identify weak identity-linking logic, but provider-specific verification behavior should also be validated in integration tests.

