llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · @better-auth/stripe

GHSA-X8J7-XH58-RV6X

@better-auth/stripe: Billing actions can target another customer's Stripe account

Parche disponible
Descargar PNG JSON
CVSS 3.1
5.9
Media
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche el mismo día de la divulgación
Exposición16 dDesde la divulgación, 3 nov 2026, 4:39 p. m.
Detección14 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 1.7.16 +1
Monitoreo
Detectada +1
3 nov 26
18 nov 26
19 nov 26
3 nov 26
7 nov 26
11 nov 26
15 nov 26
19 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-X8J7-XH58-RV6X divulgada · CVSS 5.9 (GitHub)
Remediación Parche 1.7.16 @better-auth/stripe · 0 d desde divulgación
Remediación Parche 1.8.0-beta.5 @better-auth/stripe · 0 d desde divulgación
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Am I affected?

You are affected if you register the `stripe()` plugin from `@better-auth/stripe` 1.2.0-beta.18 or later. The billing effects need `subscription.enabled: true`.

Summary

The Stripe plugin stores each user's Stripe customer ID on the user record. That field accepted values from sign-up and profile update requests, so a user could replace their own customer ID with another customer's. The billing portal, checkout, and webhook handling then treated that customer as theirs.

Impact

A signed-in user who knows another customer's Stripe ID can open the billing portal for that customer. There they can see invoices and billing details, change payment methods, and cancel or change subscriptions. A subscription created for that customer outside checkout could also be attributed to the attacker. The flaw does not sign anyone in as another user or expose Stripe API keys.

Patches

Upgrade `@better-auth/stripe` to 1.7.16, or to 1.8.0-beta.5 on the beta line.

Customer IDs and the subscription fields the plugin manages can no longer be set from sign-up or update-user requests, including server calls such as `auth.api.updateUser`. Write them through your database adapter instead.

The upgrade does not change values written before it. Check for customer IDs held by more than one user (see Workarounds).

Workarounds

Add `databaseHooks.user.create.before` and `databaseHooks.user.update.before` hooks that remove `stripeCustomerId` from incoming data.

To find values written before the fix, look for customer IDs held by more than one user. For example, on PostgreSQL with the default schema names:

SELECT "stripeCustomerId", array_agg("id") AS user_ids
FROM "user"
WHERE "stripeCustomerId" IS NOT NULL
GROUP BY "stripeCustomerId"
HAVING count(*) > 1;

Compare each row with the Stripe customer's `metadata.userId`. Run the same check on `organization` if organization billing is enabled.

Technical details

`stripeCustomerId` had no `input: false`, so the generic user routes accepted it. The billing routes now also take the customer type from the authorized reference instead of the request body. When several records share a customer ID, the `customer.subscription.created` webhook now attributes the subscription to the owner recorded on the Stripe customer, and skips it with a warning when no recorded owner holds the ID.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
@better-auth/stripe≥ 1.2.0-beta.18 < 1.7.16
@better-auth/stripe≥ 1.8.0-beta.0 < 1.8.0-beta.5
1.2.0-beta.18
1.7.16
1.7.25
1.8.0-beta.0
1.8.0-beta.5
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npm@better-auth/stripe
Corregida 1.7.16, 1.8.0-beta.5 0 d · 0 d 1.7.25 no afectada
Versiones corregidas1.7.161.8.0-beta.5
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/better-auth/better-auth/security/advisories/GHSA-x8j7-xh58-rv6x

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.