8.5high
Directus has a Path Traversal and Broken Access Control in File Management API
- Severity
- 8.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.21% (higher than 12% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-393c-p46r-7c95
Description
Directus is a real-time API and App dashboard for managing SQL database content. Prior to 11.17.0, the PATCH /files/{id} endpoint accepts a user-controlled filename_disk parameter. By setting this value to match the storage path of another user's file, an attacker can overwrite that file's content while manipulating metadata fields such as uploaded_by to obscure the tampering. This vulnerability is fixed in 11.17.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| directus directus | < 11.17.0 | CVE List |
| directus (npm) | before 11.17.0 | GitHub Advisory Database |
| monospace directus | before 11.17.0 | NVD |
All scores
| GitHub_M | 8.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N |
| GitHub | 8.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
Directus is a real-time API and App dashboard for managing SQL database content. Prior to 11.17.0, the PATCH /files/{id} endpoint accepts a user-controlled filename_disk parameter. By setting this value to match the storage path of another user's file, an attacker can overwrite that file's content while manipulating metadata fields such as uploaded_by to obscure the tampering. This vulnerability is fixed in 11.17.0.
GitHub Advisory Database
Summary
A broken access control vulnerability was identified in the Directus file management API that allows authenticated users to overwrite files belonging to other users by manipulating the filename_disk parameter.
Details
The PATCH /files/{id} endpoint accepts a user-controlled filename_disk parameter. By setting this value to match the storage path of another user's file, an attacker can overwrite that file's content while manipulating metadata fields such as uploaded_by to obscure the tampering.
Impact
- Unauthorized File Overwrite: Attackers can replace legitimate files with malicious content, creating significant risk of malware propagation and data corruption.
- Remote Code Execution: If the storage backend is shared with the extensions location, attackers can deploy malicious extensions that execute arbitrary code when loaded.
- Data Integrity Compromise: Files can be tampered with or replaced without visible indication in the application interface.
Mitigation
The filename_disk parameter should be treated as a server-controlled value. Uniqueness of storage paths must be enforced server-side, and filename_disk should be excluded from the fields users are permitted to update directly.
References
| https://github.com/directus/directus/security/advisories/GHSA-393c-p46r-7c95 | mitigation, vendor-advisory, web | |
| https://github.com/directus/directus/releases/tag/v11.17.0 | product, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-39942 | advisory | |
| https://github.com/directus/directus | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-39942 changed 2026-04-09 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-393c-p46r-7c95 changed 2026-04-09 | CC-BY-4.0 |
| NVD | CVE-2026-39942 changed 2026-06-17 | Public domain |