GHSA-GWVV-RR68-CMV6
Unauthenticated persistent Denial of Service via prototype pollution in the `deep` query parameter
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 12.2.0 | directus · -22 d desde divulgación | |
| Divulgación | Publicada | GHSA-GWVV-RR68-CMV6 divulgada · CVSS 7.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
A single unauthenticated `GET` request to the Directus items API can crash the Node.js process and keep it down. The
`deep` query parameter, when supplied as a JSON string, is parsed and its keys are used to build an object path that is
written with a prototype-walking setter, with no validation of the key names. A crafted payload uses inherited built-in
method names (rather than `__proto__`, `constructor`, or `prototype`) to corrupt a shared JavaScript built-in. Directus
later invokes that built-in in its logging path, which now throws outside any request handler and terminates the server.
The instance stays down until it is restarted, and the same request kills it again.
Details
The `deep` sanitization runs inside the global query-sanitization middleware, which executes before any per-collection
permission check. A missing token is admitted as the `public` role without throwing, so the vulnerable code path is
reached by a completely unauthenticated request, and even for a collection that does not exist.
When `deep` is provided as a JSON string it is parsed and walked key-by-key into an object path, which is then written
with a setter that traverses and reuses inherited properties. Because the setter follows the prototype chain, a path
built from attacker-controlled keys named after inherited built-in methods reads the corresponding function on the
prototype and overwrites one of its properties. This corrupts a shared built-in that is used pervasively across Node.js
and Directus's logging stack. The next time that built-in is invoked (on response finalization, outside the request
try/catch), it throws an unhandled error and the process exits.
Notably:
- The write never touches `__proto__`, `constructor`, or `prototype`, so blocklists that only cover those three keys do
- Query-string bracket notation is not a viable delivery vector because the underlying query parser strips
CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes / Prototype Pollution) leading to CWE-400
(Uncontrolled Resource Consumption / Denial of Service).
Impact
- Complete, persistent Denial of Service from one unauthenticated request. The Node process exits, so the admin app
- Unauthenticated and pre-authorization. The request is admitted as `public`, and the vulnerable code runs before
- Re-triggerable. Process supervisors (pm2, systemd, Docker `restart: always`) bring the server back, but the same
References
- Fix: https://github.com/directus/directus/pull/27992
- GHSA-gwvv-rr68-cmv6
Credits
Reported by Positive Security (https://positive.security/)
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npmdirectus |
Corregida | 12.2.0 | -22 d | 12.6.1 no afectada |
12.2.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/directus/directus/security/advisories/GHSA-gwvv-rr68-cmv6Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
