Intel

AIKIDO-2026-231663

@better-auth/stripe is vulnerable to Insecure Direct Object Reference (IDOR) / Mass Assignment

GHSA-x8j7-xh58-rv6xPublished Nov 4, 2026
November 4, 2026

59

CVE Score

Medium

Insecure Direct Object Reference (IDOR) / Mass Assignment

Are you affected? Scan for Free

TL;DR

The Stripe plugin stores each user's Stripe customer ID (stripeCustomerId) on the user record, but the field was not marked as input: false, so the generic sign-up and update-user routes accepted it from the client. An authenticated user who knows another customer's Stripe ID can overwrite their own value with it, after which the billing portal, checkout and webhook handling treat that customer as theirs. The attacker can view invoices and billing details, change payment methods, and cancel or modify the victim's subscriptions, and subscriptions created outside checkout can be attributed to the attacker. The flaw does not allow signing in as another user or expose Stripe API keys.

How do I fix this?

Upgrade @better-auth/stripe to the patch version. The upgrade does not change values written before it, so check for Stripe customer IDs held by more than one user (and organization, if organization billing is enabled) and compare them with the Stripe customer's metadata.userId. As a workaround, add databaseHooks.user.create.before and databaseHooks.user.update.before hooks that remove stripeCustomerId from incoming data.

Who does this affect?

You are affected if you register the stripe() plugin from @better-auth/stripe and use a version within the vulnerable range. The billing effects require subscription.enabled: true.

Versions

1.2.0 - 1.7.15

Fixed in 1.7.16

Background info

@better-auth/stripe is vulnerable to Insecure Direct Object Reference (IDOR) / Mass Assignment in versions 1.2.0 - 1.7.15.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea