{"id":"CVE-2024-39701","aliases":["CVE-2024-39701","GHSA-hxgm-ghmv-xjjm"],"related":[],"kind":"vulnerability","state":"published","title":"Directus Incorrectly handles _in` filter","summary":"Directus is a real-time API and App dashboard for managing SQL database content. Directus >=9.23.0, <=v10.5.3 improperly handles _in, _nin operators. It evaluates empty arrays as valid so expressions like {\"role\": {\"_in\": $CURRENT_USER.some_field}} would evaluate to true allowing the request to pass. This results in Broken Access Control because the rule fails to do what it was intended to do: Pass rule if **field** matches any of the **values**. This vulnerability is fixed in 10.6.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Directus is a real-time API and App dashboard for managing SQL database content. Directus >=9.23.0, <=v10.5.3 improperly handles _in, _nin operators. It evaluates empty arrays as valid so expressions like {\"role\": {\"_in\": $CURRENT_USER.some_field}} would evaluate to true allowing the request to pass. This results in Broken Access Control because the rule fails to do what it was intended to do: Pass rule if **field** matches any of the **values**. This vulnerability is fixed in 10.6.0.","source":"cvelist"},{"lang":"en","text":"### Summary\nDirectus >=9.23.0, <=v10.5.3 improperly handles _in, _nin operators.\nIt evaluates empty arrays as valid so expressions like {\"role\": {\"_in\": $CURRENT_USER.some_field}} would evaluate to true allowing the request to pass.\n\n### Details\nThis results in Broken Access Control because the rule fails to do what it was intended to do: Pass rule if **field** matches any of the **values**. ref: https://docs.directus.io/reference/filter-rules.html#filter-operators\nIn my example this would translate to \"Pass rule if **<collection>.role** matches any of **[]**\". Which should fail. This instead passes in Directus <= v10.5.3, >=v9.23.0\n\n### PoC\n{\"role\": {\"_in\": $CURRENT_USER.some_field}} field validation would pass if $CURRENT_USER.some_field is null.\n\nReal scenario: Using https://github.com/u12206050/directus-extension-role-chooser with the specified versions of Directus (I tested on 10.0.0) allows users with access to this feature set their role to whatever role if they don't have any roles assigned (user_roles.role is left with the default value, null) despite the validation rule being \n```yaml\nvalidation:\n    role:\n      _in: $CURRENT_USER.user_roles.role\n```\nLatest version of Directus (v10.8.3 and above) handles the above validation rule correctly.\n\n### Impact\nPermissions fail to open for setups relying on this filter and can lead to users getting access to things they're not supposed to.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Directus es una API y un panel de aplicaciones en tiempo real para administrar el contenido de la base de datos SQL. Directus &gt;=9.23.0, &lt;=v10.5.3 maneja incorrectamente los operadores _in, _nin. Evalúa matrices vacías como válidas, por lo que expresiones como {\"role\": {\"_in\": $CURRENT_USER.some_field}} se evaluarían como verdaderas, lo que permitiría que se aprobara la solicitud. Esto da como resultado un control de acceso roto porque la regla no logra hacer lo que estaba previsto: aprobar la regla si el **field** coincide con alguno de los **values**. Esta vulnerabilidad se solucionó en 10.6.0.","source":"nvd"}],"published":"2024-07-08T16:43:01.595Z","modified":"2026-09-10T03:50:16.748Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N","score":6.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","score":7.7,"rating":"HIGH"}],"cwes":["CWE-284"],"affected":[{"ranges":[{"version":">= 9.23.0, < 10.6.0","status":"affected"}],"vendor":"directus","product":"directus","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"9.23.0","fixed":"10.6.0","status":"affected"}],"vendor":"monospace","product":"directus","cpe":"cpe:2.3:a:monospace:directus:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"9.23.0","status":"affected","fixed":"10.6.0"}],"ecosystem":"npm","package":"directus","purl":"pkg:npm/directus","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"9.23.0","fixed":"10.6.0"}],"vendor":"monospace","product":"directus","cpe":"cpe:2.3:a:monospace:directus:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/directus/directus/security/advisories/GHSA-hxgm-ghmv-xjjm","tags":["exploit","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39701","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/directus/directus","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2024-07-08T19:39:42.719Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-39701","url":"https://www.cve.org/CVERecord?id=CVE-2024-39701","licence":"CVE Terms of Use","modified":"2024-08-02T04:26:16.090Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hxgm-ghmv-xjjm","url":"https://github.com/advisories/GHSA-hxgm-ghmv-xjjm","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:16.748Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-39701","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39701","licence":"Public domain","modified":"2026-06-17T07:42:30.090Z"}],"updatedAt":"2026-11-25T22:58:42.561Z","epss":{"score":0.00423,"percentile":0.3861,"date":"2026-12-01T12:00:22.000Z"}}