The NativeAuthenticationStrategy.authenticate() method is vulnerable to a timing attack that allows attackers to enumerate valid usernames (email addresses).
In packages/core/src/config/auth/native-authentication-strategy.ts, the authenticate method returns immediately if a user is not found:
const user = await this.userService.getUserByEmailAddress(ctx, data.username);
if (!user) {
return false; // Instant return (~1-5ms)
}
const passwordMatch = await this.verifyUserPassword(ctx, user.id, data.password);
// Password check takes ~200-400ms with bcrypt (12 rounds)
The significant timing difference (~200-400ms for bcrypt vs ~1-5ms for DB miss) allows attackers to reliably distinguish between existing and non-existing accounts.
Perform a dummy bcrypt check when user is not found to ensure consistent response times.
| Score | Percentile |
|---|---|
| 0.02% | 5.41% |
| Base score | Version | Severity | Vector |
|---|---|---|---|
| 2.7 | 4.0 | — |
|
| Type | Value |
|---|---|
| GHSA | GHSA-6f65-4fv2-wwch ↗ |
| CVE | CVE-2026-25050 ↗ |
| CWE id | Name |
|---|---|
| CWE-202 | Exposure of Sensitive Information Through Data Queries |
Vulnerable version ranges and first patched releases as published by GitHub.
| Ecosystem | Package | Vulnerable range | First patched | Vulnerable functions |
|---|---|---|---|---|
| npm | @vendure/core | < 3.5.3 | 3.5.3 | — |