llamaCVEVulnerability Intelligence
/
Advisory · GitHub · crates.io · surrealdb

GHSA-2JC3-58Q7-MM2J

The `revoke` RPC invalidates any user's refresh token without authentication or proof of possession

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS 3.1
6.5
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -4 d de la divulgación
Exposición54 dDesde la divulgación, 28 sept 2026, 6:15 a. m.
Detección53 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Ponle etiqueta y a la cola. Ordenadito.Rumio tranquila, pero no me olvido de esta.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 3.3.0
Monitoreo
Detectada +1
24 sept 26
28 sept 26
20 nov 26
21 nov 26
24 sept 26
9 oct 26
23 oct 26
7 nov 26
21 nov 26
FechaFaseEventoDetalle
Remediación Parche 3.3.0 surrealdb · -4 d desde divulgación
Divulgación Publicada GHSA-2JC3-58Q7-MM2J divulgada · CVSS 6.5 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

SurrealDB record access methods defined `WITH REFRESH` issue a refresh token that a client can later exchange for new access tokens. The `revoke` RPC method invalidates such a refresh token. That method performed no authentication and no proof of possession: it took the target namespace, database, and access method from an access token that was decoded without verifying its signature, took the grant identifier from a refresh string that was only format-checked, and then carried out the revocation as root. It never verified that the caller actually held the refresh token's key.

A grant identifier is not a secret. `ACCESS <ac> SHOW ALL` reveals every grant's `id` (only the key is redacted) and requires only `VIEWER`-level view permission on the access method, and the identifier is embedded in every issued refresh token. So any caller who learned a grant identifier — a low-privileged database user, or anyone to whom a token leaked — could permanently revoke the corresponding refresh token without holding its key. This turned an operation that over SurrealQL (`ACCESS ... REVOKE GRANT`) requires the Owner role into one reachable by a low-privileged, or in principle unauthenticated, RPC caller.

The victim's refresh token was then permanently invalidated: every subsequent refresh failed, forcing re-authentication.

Impact

This affects deployments that use record access methods defined `WITH REFRESH` and expose the `/rpc` endpoint (the default), where an attacker can learn a grant identifier — for example through any database-level account (including `VIEWER`) via `ACCESS <ac> SHOW ALL`, or through a leaked refresh token.

What an attacker can do:

  • Permanently revoke another user's refresh token by supplying its grant identifier to the `revoke` RPC, without holding the token's key.
  • Enumerate all grant identifiers for an access method with only `VIEWER`-level view permission, and revoke every user's refresh token for that method, denying refresh to all of its users.

What it can't do:

  • Recover the refresh token's key, sign in as the victim, or read the victim's data — this is not account takeover or data disclosure. The victim can re-authenticate with their credentials.
  • Guess a grant identifier without a disclosure channel; the identifier carries roughly 68 bits of entropy, so a low-privilege or token-leak channel is required in practice.
  • Affect deployments that do not use `WITH REFRESH`.
Patches

Revoking a refresh token now requires proof of possession. The presented refresh key is verified with a constant-time comparison against the stored grant — the same check the refresh (sign-in) path already performs — before anything is revoked, so only the holder of the token (or an Owner acting through SurrealQL) can revoke it. Every failure is reported as an opaque authentication error, so a caller cannot distinguish a wrong key from a missing, expired, or already-revoked grant.

  • Versions 3.3.0 and later are not affected by this issue.
Workarounds

Users unable to patch should consider the following workarounds:

  • Deny the `revoke` RPC method via capabilities where refresh-token revocation is not required (for example `--deny-rpc revoke`, env `SURREAL_CAPS_DENY_RPC`).
  • Restrict network access to the `/rpc` endpoint to trusted clients.
  • Treat grant identifiers as sensitive: limit who holds database-level accounts that can run `ACCESS <ac> SHOW ALL`, since it discloses grant identifiers.
References
  • SurrealQL Documentation — DEFINE ACCESS https://surrealdb.com/docs/surrealql/statements/define/access
  • SurrealDB Documentation — RPC protocol https://surrealdb.com/docs/surrealdb/integration/rpc
  • SurrealDB Documentation — Capabilities https://surrealdb.com/docs/surrealdb/security/capabilities
  • `fix(iam): require proof of possession to revoke a refresh token` (included in SurrealDB 3.3.0)
Acknowledgements

Thank you to Yanhaoxi https://github.com/Yanhaoxi for reporting this issue.

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:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:N
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
8.3/ 10Alto
Vector 8.3 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
surrealdb≥ 3.0.0 < 3.3.0
3.0.0
3.3.0
4.0.1
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
crates.iosurrealdb
Corregida 3.3.0 -4 d 4.0.1 no afectada
Versiones corregidas3.3.0
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/surrealdb/surrealdb/security/advisories/GHSA-2jc3-58q7-mm2j

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