llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · directus

GHSA-MWW8-4GWH-RJFW

Missing Origin validation on WebSocket upgrades allows Cross-Site WebSocket Hijacking

Parche disponible
Descargar PNG JSON
CVSS 3.1
8.1
Alta
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A: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ón107 dDesde la divulgación, 5 ago 2026, 11:09 a. m.
Detección105 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 12.1.0
Monitoreo
Detectada +1
1 jul 26
5 ago 26
18 nov 26
21 nov 26
1 jul 26
6 ago 26
10 sept 26
16 oct 26
21 nov 26
FechaFaseEventoDetalle
Remediación Parche 12.1.0 directus · -35 d desde divulgación
Divulgación Publicada GHSA-MWW8-4GWH-RJFW divulgada · CVSS 8.1 (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

Missing Origin validation on WebSocket upgrades allows Cross-Site WebSocket Hijacking

Summary

The WebSocket upgrade handler accepted cross-origin upgrade requests that carried the `directus_session_token` session
cookie, without validating the `Origin` header of the handshake. A browser automatically attaches cookies to a WebSocket
handshake and, unlike the REST and GraphQL transports, the upgrade path is registered directly on the HTTP server and
therefore never passes through the CORS middleware. In affected deployments, a page on an attacker-controlled origin
could open a WebSocket to a Directus instance and have the connection authenticated as the visiting user.

Details

When a WebSocket upgrade request arrived with a session cookie present, the connection was authenticated from that
cookie and the socket was established with the corresponding user's accountability. No comparison was made against the
request host, `PUBLIC_URL`, or the `CORS_ORIGIN` allowlist before accepting the upgrade.

The cookie branch was evaluated ahead of the configured WebSocket authentication mode, so setting `WEBSOCKETS_REST_AUTH`
or `WEBSOCKETS_GRAPHQL_AUTH` to `handshake` or `strict` did not prevent a cookie-bearing handshake from being accepted.

Exploitation requires all of the following:

  • WebSockets are enabled (`WEBSOCKETS_ENABLED=true`). This is not the default.
  • The victim is signed in using session cookie authentication, which is the mode the Admin App uses.
  • The victim's browser attaches the session cookie to the attacker's cross-origin handshake. This happens when
  • The victim visits the attacker-controlled page while their session is valid.

Impact

An attacker who can get a signed-in user to load a page under their control can drive an authenticated WebSocket session
with that user's permissions. Over that connection they can read, create, update, and delete items, and open
subscriptions, on any collection the victim has access to. If the victim is an administrator, this extends to system
collections such as `directus_users`, `directus_roles`, and `directus_permissions`.

The attacker's page can read WebSocket responses directly, so this results in data disclosure as well as unauthorized
writes. The session token itself is `HttpOnly` and is not exposed to the attacker's script.

Workarounds

For deployments that cannot upgrade immediately:

  • Disable WebSockets (`WEBSOCKETS_ENABLED=false`) if they are not in use.
  • Avoid `SESSION_COOKIE_SAME_SITE=none`. Serving the Admin App and the API from the same site allows the default `lax`
  • Enforce an `Origin` allowlist for the WebSocket paths at a reverse proxy in front of Directus.
  • Treat control of any subdomain sharing the API's registrable domain as equivalent to control of the session, and

Credit

Reported by @tonghuaroot

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

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:R
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
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
directus≥ 10.10.5 < 12.1.0
10.10.5
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-mww8-4gwh-rjfw

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