CVE-2024-39701

CVE-2024-39701 is a high-severity security vulnerability in directus (npm), affecting versions >= 9.23.0, <= 10.5.3. It is fixed in 10.6.0.

Summary

Directus incorrectly handles _in filter

Full technical description

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.

Details

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. ref: https://docs.directus.io/reference/filter-rules.html#filter-operators
In my example this would translate to "Pass rule if .role matches any of []". Which should fail. This instead passes in Directus <= v10.5.3, >=v9.23.0

PoC

{"role": {"_in": $CURRENT_USER.some_field}} field validation would pass if $CURRENT_USER.some_field is null.

Real 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

validation:
    role:
      _in: $CURRENT_USER.user_roles.role

Latest version of Directus (v10.8.3 and above) handles the above validation rule correctly.

Impact

Permissions fail to open for setups relying on this filter and can lead to users getting access to things they're not supposed to.

CVE-2024-39701 has a CVSS score of 6.3 (High). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (10.6.0); upgrading removes the vulnerable code path.

Affected versions

directus (>= 9.23.0, <= 10.5.3)

Security releases

directus → 10.6.0 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade directus to 10.6.0 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2024-39701? CVE-2024-39701 is a high-severity security vulnerability in directus (npm), affecting versions >= 9.23.0, <= 10.5.3. It is fixed in 10.6.0.
  2. How severe is CVE-2024-39701? CVE-2024-39701 has a CVSS score of 6.3 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of directus are affected by CVE-2024-39701? directus (npm) versions >= 9.23.0, <= 10.5.3 is affected.
  4. Is there a fix for CVE-2024-39701? Yes. CVE-2024-39701 is fixed in 10.6.0. Upgrade to this version or later.
  5. Is CVE-2024-39701 exploitable, and should I be worried? Whether CVE-2024-39701 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2024-39701 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2024-39701? Upgrade directus to 10.6.0 or later.

Other vulnerabilities in directus

Stop the waste.
Protect your environment with Kodem.