GitHub Advisoryadvisory · npm

GHSA-hxgm-ghmv-xjjm Directus incorrectly handles `_in` filter

HIGH Published 2024-07-08 Modified 2025-09-04 Official page ↗
Aliases
CVE-2024-39701
Ecosystem
npm
Packages
directus
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N
Weaknesses
CWE-284
Reviewed
2024-07-08

Affected packages

• npm directus: >= 9.23.0, < 10.6.0 → fixed in 10.6.0

Description

Summary Directus >=9.23.0, .role matches any of []**". Which should fail. This instead passes in Directus =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 ```yaml 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.

Related

Alias · CVE (1)

  • CVE-2024-39701 Directus is a real-time API and App dashboard for managing SQL database content. vulnerability

Weakness · CWE (1)

  • CWE-284 Improper Access Control weakness

References