Skip to main content
Menu
Advisories

Account takeover through email and phone verification codes in @convex-dev/auth

GHSA-HMVV-G278-4X95Published Updated GitHub

Description

We strongly recommend updating to @convex-dev/auth@0.0.98 or later.

@convex-dev/auth from 0.0.25 up to 0.0.96 contains an authentication weakness in email and phone verification codes. In affected configurations, an unauthenticated attacker can sign in as another user of the application by performing a brute-force attack.

Applications that use email or phone verification codes in any form (OTP sign-in, email verification, or password reset) should update. Not every configuration is exploitable, but the distinction depends on implementation details that we will publish with the full advisory, so we recommend that all users update rather than assess their configuration.

Full details and a proof of concept will be published 30 days after this advisory.

Details

Withheld until the 30-day update.

Proof of concept

Withheld until the 30-day update.

Impact

Full account takeover of users of the application. The attacker can read and change everything that the user can.

This happens when:

  • The application uses @convex-dev/auth >= 0.0.25 and < 0.0.97.
  • AND it uses email or phone verification codes: OTP sign-in, or the verify or reset option of the Password provider.
  • AND further conditions on the provider configuration that will be published with the full advisory.

Not affected:

  • Applications that only use OAuth, OIDC, Anonymous, or Password without verify and reset.
  • @convex-dev/auth 2.0.0-alpha.1 and later.

The vulnerable code runs inside the application's own Convex deployment, so Convex cloud, self-hosted and local deployments are affected in the same way. An attacker can only reach accounts of the application they are attacking, not other Convex deployments.

Remediation and mitigation

Upgrade to @convex-dev/auth@0.0.98 or later and redeploy. This update has no breaking changes.

Note

The fix was first released in 0.0.97, but that version was published without its build output and cannot be installed. 0.0.98 contains the same fix.

We are not aware of any exploitation of this issue in the wild. Exploiting it requires a brute-force attack, which produces a large number of calls to the auth:signIn action and of failed sign-in attempts. If your deployment's function call volume and sign-in logs show no unusual spike, it is unlikely that it was exploited.

Affected versions

References

GitHub · convex/convex-auth