GHSA-393c-p46r-7c95

Suggest an improvement
Source
https://github.com/advisories/GHSA-393c-p46r-7c95
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-393c-p46r-7c95/GHSA-393c-p46r-7c95.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-393c-p46r-7c95
Published
2026-04-04T06:06:39Z
Modified
2026-04-04T06:18:49.113023Z
Severity
  • 8.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N CVSS Calculator
Summary
Directus: Path Traversal and Broken Access Control in File Management API
Details

Summary

Critical vulnerabilities were identified in the Directus file management API that allow unauthorized manipulation of file storage paths and metadata. These issues enable attackers to overwrite files belonging to other users, write files outside intended storage boundaries via path traversal, and potentially achieve remote code execution under certain conditions.

Details

The file management API accepts user-controlled parameters that should be restricted to server-side logic only. Specifically, the filename_disk parameter can be manipulated in both POST /files and PATCH /files/{id} requests, enabling two attack vectors:

  1. Path Traversal: By specifying paths containing ../ sequences in the filename_disk parameter during file upload, attackers can write files outside the intended storage prefix.

  2. Broken Access Control: By modifying the filename_disk parameter to reference another user's file, attackers can overwrite legitimate files with malicious 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.

  • Storage Boundary Bypass: Files can be written to arbitrary locations outside the designated storage area, potentially affecting system configurations or application components.

  • Remote Code Execution: If the storage backend is shared with the extensions location, attackers can deploy malicious extensions that execute arbitrary code when loaded (either via service restart or administrator-triggered extension reload).

  • Data Integrity Compromise: Sensitive files can be tampered with or replaced without visible indication in the application interface, undermining trust in stored data.

Mitigation

The filename_disk parameter should not be accepted from client input. File paths must be generated exclusively using server-side logic. If client input must be accepted for any path-like parameters, implementations should normalize paths and strictly verify containment within allowed directories, rejecting path traversal sequences, absolute paths, and path separator variants.

Database specific
{
    "cwe_ids": [
        "CWE-284",
        "CWE-915"
    ],
    "severity": "HIGH",
    "nvd_published_at": null,
    "github_reviewed": true,
    "github_reviewed_at": "2026-04-04T06:06:39Z"
}
References

Affected packages

npm / directus

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
11.17.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-393c-p46r-7c95/GHSA-393c-p46r-7c95.json"