CVE-2023-38503: Directus has Incorrect Permission Checking for GraphQL Subscriptions
Summary
CWE-200: Exposure of Sensitive Information to an Unauthorized Actor Access to information you should not have access to when the permissions rely on $CURRENTUSER for filtering.
Details
The permission filters (i.e. usercreated IS $CURRENTUSER) are not properly checked when using GraphQL subscription resulting in unauthorized users getting event on their subscription which they should not be receiving according to the permissions. This can be any collection but out-of-the box the directususers collection is configured with such a permissions filter allowing you to get updates for other users when changes happen.
An example: graphql subscription { directususersmutated { event data { id lastaccess lastpage } } }
Patches https://github.com/directus/directus/pull/19155
Workarounds Disable GraphQL Subscriptions
References
Other sources
Directus is a real-time API and App dashboard for managing SQL database content. Starting in version 10.3.0 and prior to version 10.5.0, the permission filters (i.e. usercreated IS $CURRENTUSER) are not properly checked when using GraphQL subscription resulting in unauthorized users getting event on their subscription which they should not be receiving according to the permissions. This can be any collection but out-of-the box the directususers collection is configured with such a permissions filter allowing you to get updates for other users when changes happen. Version 10.5.0 contains a patch. As a workaround, disable GraphQL subscriptions.
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is CVE-2023-38503?
CVE-2023-38503 is a vulnerability that allows unauthorized actors to access sensitive information in Directus, a real-time API and App dashboard for managing SQL database content.
What is the severity of CVE-2023-38503?
CVE-2023-38503 has a severity score of 6.5, which is considered medium.
How does CVE-2023-38503 impact Directus?
CVE-2023-38503 affects Directus by exposing sensitive information to unauthorized actors.
What is the Common Weakness Enumeration (CWE) associated with CVE-2023-38503?
CVE-2023-38503 is associated with CWE-200 and CWE-863.
How can I fix CVE-2023-38503?
To fix CVE-2023-38503, it is recommended to update Directus to version 10.5.0 or apply the necessary patches provided by the vendor.