llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · directus

GHSA-XJXQ-PJ7H-G676

TUS Upload Authorization Bypass Allows Cross-User File Overwrite

Parche disponible
Descargar PNG JSON
CVSS 3.1
7.1
Alta
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L 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ón108 dDesde la divulgación, 5 ago 2026, 10:13 a. m.
Detección105 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.
Revisa tus logs de la semana con la lupa.Ponle una regla en tu SIEM y seguimos.
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
11 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-XJXQ-PJ7H-G676 divulgada · CVSS 7.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

Summary

On Directus instances with the TUS resumable upload endpoint enabled (`TUS_ENABLED=true`), the endpoint did not enforce item level authorization on the file targeted by an upload replacement. An authenticated user holding `create` and `update` permission on `directus_files` could overwrite any other user's file, both its stored contents and its `directus_files` record, by naming the victim's file id in the `Upload-Metadata` header of a new upload.

This is a variant of GHSA-qqmv-5p3g-px89 https://github.com/directus/directus/security/advisories/GHSA-qqmv-5p3g-px89. The fix for that advisory added an item level access check for the `id` upload metadata key, but the upload completion handlers acted on a second, adjacent metadata key (`replace_id`) that was never validated against the caller. An upload supplying only `replace_id` was evaluated as an ordinary `create` against the caller's own permissions, while the completion path resolved and rewrote the referenced record using internal services that run without accountability.

The same upload path also lacked two guards that the regular `/files` endpoint applied to a client supplied `filename_disk`: storage path normalization and the filename uniqueness check. That gave a second route to clobbering another user's stored object, and, on deployments where the extensions or temporary directory sits inside the configured storage location, to writing into those directories.

Impact

  • Cross-user file overwrite. The attacker needs only their own create and update permission on `directus_files` plus the target file's id. File ids are not secrets: they appear in asset URLs, relational payloads, and ordinary API responses.
  • Metadata rewrite at elevated privilege. The victim's record was updated by an internal service instantiated without accountability, so per field permissions and item level rules on the victim's record did not apply. Attacker controlled `filename_download`, `filesize`, `type`, and extracted `metadata` replaced the original values.
  • Content substitution under the original owner's identity. The record's `id` and `uploaded_by` were preserved, so any consumer that trusts the record's owner (published content referencing an asset by id, CDN cached asset URLs, email templates, documents attached to records) served the attacker's content in place of the original.
  • Loss of the original data. The previously stored object and its generated thumbnails were deleted as part of the replacement, so the original content was not recoverable from Directus.

No credential disclosure and no direct code execution were identified, and reading another user's file content was not part of this issue.

Affected versions

  • Package: `directus` (npm), and the corresponding `directus/directus` container images
  • Affected: `>= 10.13.0, < 12.1.0`
  • Patched: `12.1.0`

Preconditions: `TUS_ENABLED=true` (this is not the default) and an attacker role whose policy grants `create` and `update` on `directus_files`.

The affected metadata handling was introduced together with TUS support in 10.13.0. Versions below 11.16.1 are additionally affected by GHSA-qqmv-5p3g-px89. The fix was not backported, so instances on 11.x need to move to 12.1.0 or later.

Severity

High, 7.1

`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L`

  • AV:N the TUS endpoint is reachable over the network.
  • AC:L a single upload creation request with one extra metadata key, no race or special conditions.
  • PR:L any authenticated role with create and update on `directus_files`, which is a routine grant for content editors.
  • UI:N no action by the victim is required.
  • S:U the impact stays within the Directus authorization scope.
  • C:N the attacker gains no read access to the victim's data.
  • I:H arbitrary overwrite of another user's file contents and privileged rewrite of its metadata record.
  • A:L the original stored object and its thumbnails are destroyed, so that asset is lost to legitimate consumers.

This matches the score assigned to GHSA-qqmv-5p3g-px89, which shares the impact class.

Weaknesses

  • CWE-639: Authorization Bypass Through User-Controlled Key
  • CWE-863: Incorrect Authorization

Workarounds

Set `TUS_ENABLED=false` until you can upgrade. Restricting `create` and `update` on `directus_files` to trusted roles reduces the population able to reach the endpoint but does not remove the issue for those roles.

Credit

Reported by @tr4ce-ju.

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:H
AltoBajoNinguno
DisponibilidadA:L
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.13.0 < 12.1.0
10.13.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-xjxq-pj7h-g676

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