CVE-2026-39942: Directus Path Traversal Vulnerability
HIGHCVE-2026-39942 is a HIGH (CVSS 8.5) path traversal vulnerability (CWE-284: Improper Access Control) affecting Directus libraries in the npm ecosystem. The issue involves path traversal and broken access control in file management api. Remediation is available by upgrading affected packages to version 11.17.0.
CVE-2026-39942 at a Glance
Security Impact
CVSS: 8.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N).
How to Fix CVE-2026-39942
To remediate this vulnerability, upgrade all affected Directus dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install directus@11.17.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls directus
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-39942, inspect your project dependencies using npm:
npm ls directus
Analyze the terminal output to locate any version of Directus in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 11.17.0), your application is affected.
Note: The npm ls directus command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Directus, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-39942 Affected Directus Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
directus
|
npm |
< 11.17.0
|
11.17.0
|
References
Frequently Asked Questions
What is CVE-2026-39942?
Which Directus versions are affected?
What version fixes CVE-2026-39942?
Is directus affected?
What is the CVSS score of CVE-2026-39942?
What CWE is associated with CVE-2026-39942?
How can I check npm dependencies for CVE-2026-39942?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-393c-p46r-7c95",
"modified" : "2026-04-09T19:05:27Z",
"published" : "2026-04-04T06:06:39Z",
"aliases" : [ "CVE-2026-39942" ],
"summary" : "Directus: Path Traversal and Broken Access Control in File Management API",
"details" : "## Summary\n\nA 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.\n\n## Details\n\nThe `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.\n\n## Impact\n\n- **Unauthorized File Overwrite**: Attackers can replace legitimate files with malicious content, creating significant risk of malware propagation and data corruption.\n- **Remote Code Execution**: If the storage backend is shared with the extensions location, attackers can deploy malicious extensions that execute arbitrary code when loaded.\n- **Data Integrity Compromise**: Files can be tampered with or replaced without visible indication in the application interface.\n\n## Mitigation\n\nThe `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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "directus"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "11.17.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/directus/directus/security/advisories/GHSA-393c-p46r-7c95"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-39942"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/directus/directus"
}, {
"type" : "WEB",
"url" : "https://github.com/directus/directus/releases/tag/v11.17.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-284", "CWE-639", "CWE-915" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-04T06:06:39Z",
"nvd_published_at" : "2026-04-09T17:16:29Z"
}
}