{"id":"GHSA-qqmv-5p3g-px89","summary":"Directus: TUS Upload Authorization Bypass Allows Arbitrary File Overwrite","details":"## Summary\n\nDirectus' TUS resumable upload endpoint (`/files/tus`) allows any authenticated user with basic file upload permissions to overwrite arbitrary existing files by UUID. The TUS controller performs only collection-level authorization checks, verifying the user has some permission on `directus_files`, but never validates item-level access to the specific file being replaced. As a result, row-level permission rules (e.g., \"users can only update their own files\") are completely bypassed via the TUS path while being correctly enforced on the standard REST upload path.\n\n## Impact\n\n- **Arbitrary file overwrite:** Any authenticated user with basic TUS upload permissions can overwrite any file in `directus_files` by UUID, regardless of row-level permission rules.\n- **Permanent data loss:** The victim file's original stored bytes are deleted from storage and replaced with attacker-controlled content.\n- **Metadata corruption:** The victim file's database record is updated with the attacker's filename, type, and size metadata.\nPrivilege escalation potential: If admin-owned files (e.g., application assets, templates) are stored in `directus_files`, a low-privilege user could replace them with malicious content.\n\n## Workaround\n\nDisable TUS uploads by setting `TUS_ENABLED=false` if resumable uploads are not required.\n\n## Credit\n\nThis vulnerability was discovered and reported by [bugbunny.ai](https://bugbunny.ai).","aliases":["CVE-2026-35412"],"modified":"2026-04-07T14:35:33.556091Z","published":"2026-04-04T06:11:18Z","database_specific":{"github_reviewed_at":"2026-04-04T06:11:18Z","nvd_published_at":"2026-04-06T22:16:22Z","cwe_ids":["CWE-863"],"severity":"HIGH","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/directus/directus/security/advisories/GHSA-qqmv-5p3g-px89"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35412"},{"type":"PACKAGE","url":"https://github.com/directus/directus"}],"affected":[{"package":{"name":"directus","ecosystem":"npm","purl":"pkg:npm/directus"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"11.16.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-qqmv-5p3g-px89/GHSA-qqmv-5p3g-px89.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L"}]}