CVE-2026-39942: Directus Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-393c-p46r-7c95
CVSS 8.5
CWE-284 CWE-639 CWE-915
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-39942
GHSA Identifier GHSA-393c-p46r-7c95
Severity HIGH
CVSS v3.1 Base Score 8.5
CWE Classification CWE-284: Improper Access Control
Affected Product Directus
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity High (I:H)
Availability None (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.

directus fixed: 11.17.0
npm install directus@11.17.0
Verify Direct and Transitive Dependencies

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

## 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.

CVE-2026-39942 Affected Directus Versions

1 component(s)
Fixed Versions:
11.17.0
Product / Package Ecosystem Affected Versions Fixed Version
directus
npm
< 11.17.0
11.17.0

References

Frequently Asked Questions

What is CVE-2026-39942?
CVE-2026-39942 is a security vulnerability in Directus involving Path Traversal and Broken Access Control in File Management API under CWE-284: Improper Access Control.
Which Directus versions are affected?
Affected versions include releases prior to 11.17.0 across affected packages: directus.
What version fixes CVE-2026-39942?
Upgrading to 11.17.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is directus affected?
Yes, directus is affected in releases prior to 11.17.0. Upgrade your dependency to 11.17.0 or later.
What is the CVSS score of CVE-2026-39942?
CVE-2026-39942 has a CVSS v3.1 base score of 8.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N.
What CWE is associated with CVE-2026-39942?
CVE-2026-39942 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check npm dependencies for CVE-2026-39942?
Run the dependency tree command: 'npm ls directus'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}