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

GHSA-4WQ4-2PPV-Q3HG

@better-auth/expo: Authorization proxy can sign values it did not issue

Parche disponible
Descargar PNG JSON
CVSS 3.1
9.1
Crítica
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/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:37 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
20 nov 26
3 nov 26
7 nov 26
11 nov 26
16 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-4WQ4-2PPV-Q3HG divulgada · CVSS 9.1 (GitHub)
Remediación Parche 1.7.16 better-auth · 0 d desde divulgación
Remediación Parche 1.8.0-beta.5 better-auth · 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 your server registers the `expo()` plugin from `@better-auth/expo` 1.4.0-beta.6 or later. No other setting is needed.

The wildcard origin problem below also needs a wildcard entry in `trustedOrigins`, such as `myapp://*` or `https://*.example.com`.

Summary

Signing values it did not issue. The `expo()` plugin adds a public endpoint that helps the system browser start a social sign-in. The endpoint signed a value taken from the request with the application secret and returned the signature in a cookie. Better Auth uses the same secret for email verification links and, when enabled, the session cookie cache.

Open redirect. The same endpoint could redirect a visitor to any external HTTPS site.

Wildcard trusted origins. A wildcard entry in `trustedOrigins` could match URLs outside the intended scheme, host, or path.

Impact

An unauthenticated attacker who knows a user's email address can sign in as that user and change the account's email address, with no action from the user. With the session cookie cache enabled, an attacker who knows a user's ID can also act as that user.

The open redirect can make phishing links that start on your auth origin look more convincing. The wildcard problem can let a URL you did not mean to trust pass the trusted origin check.

Patches

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

After upgrading, rotate the application secret if the endpoint was reachable. Signatures issued before the fix stay valid until the secret changes.

If Expo sign-in through an SSO identity provider fails after upgrading, add the identity provider's origin to `trustedOrigins`.

Workarounds

If you do not use Expo social sign-in, remove the `expo()` server plugin.

Otherwise, block requests to `/expo-authorization-proxy` (under your auth base path) whose `authorizationURL` carries a `state` value that is not exactly 32 characters from `A-Z`, `a-z`, `0-9`, `-` and `_`. State values that Better Auth issues always have this form. This blocks the signing problem only.

Technical details

The endpoint read `state` from the caller-supplied authorization URL and stored it in a signed cookie without checking that the server had issued it. The cookie signature is an HMAC-SHA256 keyed with the application secret. That is the same computation as an HS256 JSON Web Token signature and as the compact session cookie cache signature, so a forged email-change token or cookie cache value was accepted.

The fix signs only an unexpired state the server issued, and redirects only to the authorization endpoint origin of a configured social, generic OAuth, or trusted SSO provider. Wildcard trusted origins now match a URL by its parsed scheme, host, and path, and no longer match a URL with userinfo or one that cannot be parsed. A wildcard host made only of digits, dots, and wildcards, such as `192.168.*.*`, now matches only IPv4 addresses.

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:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
better-auth< 1.7.16
@better-auth/expo≥ 1.4.0-beta.6 < 1.7.16
@better-auth/expo · better-auth≥ 1.8.0-beta.0 < 1.8.0-beta.5
1.4.0-beta.6
1.7.16
1.7.26
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
npmbetter-auth
Corregida 1.7.16, 1.8.0-beta.5 0 d · 0 d 1.7.26 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-4wq4-2ppv-q3hg

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