Skip to content

Directus allows privilege escalation using Share feature

Moderate severity GitHub Reviewed Published Jan 23, 2025 in directus/directus • Updated Jan 23, 2025

Package

npm directus (npm)

Affected versions

< 11.2.0

Patched versions

11.2.0

Description

Summary

When sharing an item, user can specify an arbitrary role. It allows user to use a higher-privileged role to see fields that otherwise the user should not be able to see.

Details

Specifying role on share should be available only for admins. The current flow has a security flaw.

Each other role should allow to share only in the context of the same role. As there is no role hierarchy in Directus, it is impossible to tell which role is higher or lower, so only admins should be able to specify the role for share.

Optionally, instead of specifying a role, shareer* should be able to specify which fields (limited to fields shareer sees) are available on shared item. Similarily to import.

*shareer - a person that creates a share link to item

PoC

  1. Create a collection with a secret field.
  2. Create role A that sees the secret field
  3. Create role B that does not see the secret field, but can use share feature.
  4. Create item with secret field filled.
  5. Use account with role B to share the object as role A and gain unauthorized access to secret value.

Here's video example: https://www.youtube.com/watch?v=DbV4IxbWzN4
I had to upload it to YouTube, because GitHub allows only 10MB videos.

Impact

Impacted are instances that use the share feature and have specific roles hierarchy and fields that are not visible for certain roles.

References

@br41nslug br41nslug published to directus/directus Jan 23, 2025
Published by the National Vulnerability Database Jan 23, 2025
Published to the GitHub Advisory Database Jan 23, 2025
Reviewed Jan 23, 2025
Last updated Jan 23, 2025

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(18th percentile)

Weaknesses

CVE ID

CVE-2025-24353

GHSA ID

GHSA-pmf4-v838-29hg

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.