Skip to content

Incorrect Permission Checking for GraphQL Subscriptions

Moderate severity GitHub Reviewed Published Jul 25, 2023 in directus/directus • Updated Nov 5, 2023

Package

npm directus (npm)

Affected versions

>= 10.3, < 10.5.0

Patched versions

10.5.0

Description

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 $CURRENT_USER for filtering.

Details

The permission filters (i.e. user_created IS $CURRENT_USER) 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 directus_users collection is configured with such a permissions filter allowing you to get updates for other users when changes happen.

An example:

subscription {
  directus_users_mutated {
    event
    data {
      id
      last_access
      last_page
    }
  }
}

Patches

directus/directus#19155

Workarounds

Disable GraphQL Subscriptions

References

References

@br41nslug br41nslug published to directus/directus Jul 25, 2023
Published by the National Vulnerability Database Jul 25, 2023
Published to the GitHub Advisory Database Jul 25, 2023
Reviewed Jul 25, 2023
Last updated Nov 5, 2023

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
Required
Scope
Unchanged
Confidentiality
High
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:R/S:U/C:H/I:N/A:N

EPSS score

0.064%
(28th percentile)

CVE ID

CVE-2023-38503

GHSA ID

GHSA-gggm-66rh-pp98

Source code

Credits

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