GHSA-pmf4-v838-29hg

Suggest an improvement
Source
https://github.com/advisories/GHSA-pmf4-v838-29hg
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/01/GHSA-pmf4-v838-29hg/GHSA-pmf4-v838-29hg.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-pmf4-v838-29hg
Aliases
Published
2025-01-23T22:35:52Z
Modified
2025-02-11T22:09:20Z
Severity
  • 5.0 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N CVSS Calculator
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.

Database specific
{
    "nvd_published_at": "2025-01-23T18:15:33Z",
    "cwe_ids": [
        "CWE-269"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2025-01-23T22:35:52Z"
}
References

Affected packages

npm / directus

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
11.2.0

npm / @directus/app

Package

Name
@directus/app
View open source insights on deps.dev
Purl
pkg:npm/%40directus/app

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
13.3.1