All vulnerabilities

Servers and applications

GHSA-3742-46gx-c8cc

Improper path validation in TUS uploads allows writing to arbitrary storage paths

Severity
High 7.1
Published
5 Aug 2026
Last changed
5 Aug 2026
Added to UpHeron
3 Nov 2026
Fixed in
12.1.0
Weakness
Path traversal (CWE-22)CWE-73
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Change data · Slow it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
Sources
Project advisories (GitHub)

Description

The TUS (resumable upload) implementation creates the directus_files record through the generic ItemsService rather than through FilesService. The filename_disk sanitisation and validation that FilesService applies on the regular upload path is therefore skipped, and the filename_disk value supplied by the client in the TUS Upload-Metadata header is passed verbatim to the storage driver as the destination path.

An authenticated user who is permitted to create files can consequently choose the storage path their upload is written to, place uploads outside the configured storage root prefix, and overwrite the stored content of existing file records.

The concrete effect depends on the storage driver in use:

  • Local driver. The supplied path is joined onto the storage root after leading traversal segments are dropped, so writes remain inside the storage root. The attacker still controls the complete sub path and can create or overwrite any object beneath it.
From directus/directus's security advisory. Shortened; the full text is there.

Workarounds

  • Leave TUS uploads disabled (TUS_ENABLED=false, the default).
  • Restrict create permission on directus_files to trusted roles.
  • Keep the extensions and temporary directories outside the storage root, and do not share a storage bucket between uploads and the extensions location.
Workarounds as given by directus/directus's security advisory.

Affected software

SoftwareAffected versions
DirectusServers and applications · github:directus/directus
  • From 10.13.0 before 12.1.0

About Directus

The flexible backend for all your projects 🐰 Turn your DB into a headless CMS, admin panels, or apps with a custom UI, instant APIs, auth & more.

From its GitHub repository.
Weekly downloads (npm)
30,924npm, 15 Nov 2026
Docker Hub pulls
50,954,770Docker Hub, 15 Nov 2026
GitHub stars
38,722GitHub, 15 Nov 2026
Forks
5,000GitHub, 15 Nov 2026
Latest release
v12.6.1GitHub, 15 Nov 2026
Released
4 Nov 2026GitHub
First published on GitHub
12 Dec 2012GitHub

References