/

CVE-2026-35412

Severity:

HIGH RISK

(7.1)

Broken Access Control in Directus TUS Resumable Upload

CVE-2026-35412

Analyzed

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-863

Impact:

Unauthorized File Overwrite and Privilege Bypass

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Directus versions prior to 11.16.1 contain a broken access control issue in the TUS resumable upload endpoint (/files/tus) that allows authenticated users with basic upload rights to overwrite arbitrary files by UUID.

Because the endpoint only enforces collection-level permissions and skips item-level checks, row-level access rules (such as "users can only update their own files") can be bypassed when replacing existing files through this path.

Affected context

This vulnerability appears in Directus deployments where:

  • The TUS resumable upload endpoint (/files/tus) is enabled and used for file uploads
  • Users have generic file upload or update permissions on the directus_files collection
  • Row-level or item-level permission rules are configured to restrict which files a user may modify

In this context, the standard REST upload/update path correctly enforces row-level rules, but the TUS controller bypasses item-level checks, allowing file replacement by referencing the target file's UUID.

Exploit preconditions

  • Attack surface: HTTP(S) API endpoint at /files/tus in the Directus application.
  • Required access: Any authenticated Directus account with basic permission to upload or update files in the directus_files collection.
  • Permission model: Row-level (per-item) restrictions are configured, for example, "users can only update files they own."
  • Trigger point: Use of the TUS resumable upload workflow to target an existing file by its UUID.
  • Why exploitation is possible: The TUS controller checks only collection-level authorization (can this user interact with directus_files at all?) and does not revalidate whether the user is allowed to modify the specific file item referenced by the UUID, thereby bypassing row-level policies.

Why this happens

The underlying issue is an incomplete authorization implementation on an alternative upload code path.

While the primary REST file endpoints enforce item-level permission rules, the TUS resumable upload controller only evaluates access at the collection level and assumes that is sufficient.

This maps to CWE-863: Incorrect Authorization, where a system fails to consistently apply fine-grained authorization checks to every path that can affect a protected resource.

Conceptually, the bug stems from treating the TUS implementation as a purely technical transport concern and neglecting to reuse the same item-level access control logic that governs other file modification operations.

Potential impact

  • Attackers with basic file upload rights may overwrite files belonging to other users.
  • Sensitive or private content could be replaced, corrupted, or destroyed.
  • Business or audit workflows relying on file integrity can be undermined.
  • Application data integrity may be affected if overwritten files are referenced in critical processes.
  • Row-level authorization rules may appear to function correctly in the UI/API but be silently bypassed via the TUS endpoint.

General mitigation guidance

Effective mitigation focuses on making authorization consistent and centralized across all file modification paths:

  • Ensure that any endpoint capable of creating, updating, or replacing files invokes the same item-level authorization logic used by the primary REST API.
  • Treat TUS and other auxiliary protocols as wrappers around a core, well-reviewed authorization layer instead of implementing custom checks per controller.
  • Apply a default-deny posture for file updates: require explicit, per-item permission validation before allowing a file to be overwritten by UUID.
  • Design permission rules so that ownership and row-level constraints are enforced server-side based on trusted attributes (e.g., resource owner, role), not on client-provided identifiers alone.
  • Limit the breadth of generic "upload" or "update" roles where possible, reducing the blast radius if a secondary endpoint is misconfigured.

How teams detect issues like this

Organizations can detect and monitor for similar issues using multiple approaches:

  • Static analysis and code review:
  • Look for controllers or endpoints that bypass or reimplement authorization logic instead of calling shared access-control routines.
  • Flag patterns where collection-level checks (e.g., "can update files?") are performed without a corresponding item-level check tied to a specific resource identifier.
  • Authorization testing:
  • Include tests that exercise all alternative upload paths (TUS, chunked uploads, importers) with accounts that should have limited row-level permissions.
  • Use security-focused integration tests to validate that row-level rules are enforced uniformly on each endpoint.
  • Runtime monitoring:
  • Log file overwrite operations along with acting user account and target file UUID, then alert on updates where the user is not the expected owner or role.
  • Apply anomaly detection to find unusual cross-user file modifications.
  • Automated code review or API security testing tools can help identify endpoints that do not consistently call shared authorization middleware.

Sources

SourceLink
github.comgithub.com/directus/directus/security/advisories/GHSA-qqmv-5p3g-px89

Frequently asked

questions

Yes. Any remote user who can authenticate to the Directus instance and has basic file upload permissions can attempt to exploit the /files/tus endpoint over the network.

The attacker must have a valid Directus account with permission to upload or update files at the collection level. They do not need explicit permission on the specific file they are overwriting, which is the core of the issue.

The safest approach is to centralize authorization in shared functions or middleware and require that all file-modifying endpoints—including alternative protocols like TUS—invoke item-level permission checks using the same logic as the main REST API. Avoid implementing parallel, ad-hoc permission checks per endpoint.

Treat every new code path that interacts with protected resources as needing the full set of access controls from day one. Use a uniform resource-access API, enforce row-level policies server-side, add automated tests for all endpoints that modify resources, and incorporate security review whenever new upload mechanisms or protocols are introduced.

Find out what's already
exploitable in your codebase.