Advisory

GHSA-pmf4-v838-29hg

Also known as: CVE-2025-24353

Summary

Directus allows privilege escalation using Share feature

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2025-01-23 22:35 UTC
Modified
2025-02-11 22:09 UTC

Affected packages and fixes

directus

npm · All systems

Affected

  • introduced 0, fixed 11.2.0 (semver)

Fixed versions

11.2.0

Fix

@directus/app

npm · All systems

Affected

  • introduced 0, fixed 13.3.1 (semver)

Fixed versions

13.3.1

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences