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.
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
Here's video example: https://www.youtube.com/watch?v=DbV4IxbWzN4 I had to upload it to YouTube, because GitHub allows only 10MB videos.
Impacted are instances that use the share feature and have specific roles hierarchy and fields that are not visible for certain roles.
{ "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" }