llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · directus

GHSA-97XR-JCHP-XM3C

Directus public WebSocket clients gain unrestricted item access after a failed auth message

Parche disponible
Descargar PNG JSON
CVSS 4.0
9.2
Crítica
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -35 d de la divulgación
Exposición106 dDesde la divulgación, 5 ago 2026, 9:10 a. m.
Detección105 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 12.1.0
Monitoreo
Detectada +1
1 jul 26
5 ago 26
18 nov 26
20 nov 26
1 jul 26
6 ago 26
10 sept 26
15 oct 26
20 nov 26
FechaFaseEventoDetalle
Remediación Parche 12.1.0 directus · -35 d desde divulgación
Divulgación Publicada GHSA-97XR-JCHP-XM3C divulgada · CVSS 9.2 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

When a Directus instance is configured for public WebSocket REST access, a failed `auth` message on an already connected socket replaces the client's public accountability with a null accountability and leaves the connection open. Null accountability is the state Directus reserves for trusted internal calls, and the service layer skips permission evaluation entirely when it is present. Every subsequent `items` message on that socket is therefore executed with no authorization check.

The result is that failing authentication grants more access than succeeding at it. An unauthenticated attacker who can reach the public WebSocket endpoint can deliberately submit an invalid token and then read, create, update, or delete records in any user-defined collection, regardless of the permissions granted to the public role.

Details

The WebSocket `items` handler passes the connected client's accountability directly into `ItemsService`. `ItemsService` only calls its access validation when an accountability object is present, so a null value bypasses the check rather than denying it.

Deletion by query is the highest impact action reachable this way, because a single attacker-supplied filter can select every row in a collection and Directus applies no batch mutation limit by default.

The same accountability transition also occurred when a public-mode client's access token expired without a successful re-authentication, so the vulnerable state is reachable without submitting a deliberately invalid token.

Directus system collections are rejected by the handler before the service call, so users, sessions, tokens, permissions, and other `directus_*` data are not reachable through this path. Impact is confined to user-defined collections.

Impact

Confidentiality, integrity, and availability of user-defined collection data are all affected. An unauthenticated network attacker gains unrestricted read and write access to that data, and can destroy arbitrary amounts of it in a single request. Configured query limits and `MAX_BATCH_MUTATION` reduce the blast radius on some deployments but are not authorization controls.

Credentials, session tokens, and permission configuration are not directly exposed, because system collections are out of reach on this path.

Affected configurations

An instance is affected only if all of the following hold:

  • `WEBSOCKETS_ENABLED` is `true` (default: `false`)
  • `WEBSOCKETS_REST_ENABLED` is `true` (default: `true` once WebSockets are enabled)
  • `WEBSOCKETS_REST_AUTH` is `public` (default: `handshake`)
  • the WebSocket endpoint is reachable by the attacker

Instances left on the default `handshake` or `strict` WebSocket authentication modes close the socket immediately on authentication failure, which removes the unauthenticated attack path.

Patches

Fixed in Directus `12.1.0` (`@directus/api` `37.0.0`). Authentication failure and token expiry now retain a public-role accountability object instead of clearing it, in every WebSocket authentication mode. Upgrade to `12.1.0` or later.

Workarounds

If you cannot upgrade immediately, set `WEBSOCKETS_REST_AUTH` to `handshake` or `strict`, or set `WEBSOCKETS_ENABLED=false` to disable the WebSocket endpoints.

Credits

Reported by @JacobBrackett.

Vector CVSS 4.0

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
Requisitos de ataqueAT:P
NingunoPresentes
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaPasivaActiva
Confid. (sistema)VC:H
AltoBajoNinguno
Integridad (sistema)VI:H
AltoBajoNinguno
Disponib. (sistema)VA:H
AltoBajoNinguno
Confid. (posterior)SC:N
AltoBajoNinguno
Integridad (posterior)SI:N
AltoBajoNinguno
Disponib. (posterior)SA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
directus< 12.1.0
12.1.0
12.6.1
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmdirectus
Corregida 12.1.0 -35 d 12.6.1 no afectada
Versiones corregidas12.1.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/directus/directus/security/advisories/GHSA-97xr-jchp-xm3c

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