CVE-2024-54151: Directus allows unauthenticated access to WebSocket events and operations

Published Dec 9, 2024
·
Updated

Summary When setting WEBSOCKETSGRAPHQLAUTH or WEBSOCKETSRESTAUTH to "public", an unauthenticated user is able to do any of the supported operations (CRUD, subscriptions) with full admin privileges.

Details Accountability for unauthenticated WebSocket requests is set to null, which used to be "public permissions" until the Permissions Policy update which now defaults that to system/admin level access. So instead of null we need to make use of createDefaultAccountability() to ensure public permissions are used for unauthenticated users.

PoC 1. Start directus with bash WEBSOCKETSENABLED=true WEBSOCKETSGRAPHQLAUTH=public WEBSOCKETSRESTAUTH=public

2. Subscribe using GQL or REST or do any CRUD operation on a user created collection (system tables are not reachable with crud) gql subscription { directususersmutated { key event data { id email firstname lastname password } } } or json { "type": "items", "action": "read", "collection": "yourcollectionname" } 3a. Open up the data studio as any user. Observe how the subscriber gets notified on each page navigation (because the users lastpage gets updated, the password fields is properly redacted here)

3b. Observe receiving all available items from the yourcollectionname collection.

Impact

This impacts any Directus instance that has either WEBSOCKETSGRAPHQLAUTH or WEBSOCKETSRESTAUTH set to public allowing unauthenticated users to subscribe for changes on any collection or do REST CRUD operations on user defined collections ignoring permissions.

Other sources

Directus is a real-time API and App dashboard for managing SQL database content. Starting in version 11.0.0 and prior to version 11.3.0, when setting WEBSOCKETSGRAPHQLAUTH or WEBSOCKETSRESTAUTH to "public", an unauthenticated user is able to do any of the supported operations (CRUD, subscriptions) with full admin privileges. This impacts any Directus instance that has either WEBSOCKETSGRAPHQLAUTH or WEBSOCKETSRESTAUTH set to public allowing unauthenticated users to subscribe for changes on any collection or do REST CRUD operations on user defined collections ignoring permissions. Version 11.3.0 fixes the issue.

— NVD

Affected Software

3 affected componentsFixes available
npm/@directus/api>=22.2.0<23.2.0
23.2.0
npm/directus>=11.0.0<11.3.0
11.3.0
Monospace Directus Node.js>=11.0.0<11.3.0

Event History

Dec 9, 2024
Advisory Published
via GitHub·08:40 PM
CVE Published
via MITRE·08:57 PM
Data Sourced
via MITRE·08:57 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:15 PM
RemedyAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-54151?

CVE-2024-54151 has a significant severity level, as it allows unauthenticated users to perform CRUD operations with full admin privileges.

2

What software versions are affected by CVE-2024-54151?

CVE-2024-54151 affects @directus/api versions from 22.2.0 to 23.2.0 and directus versions from 11.0.0 to 11.3.0.

3

How do I fix CVE-2024-54151?

To mitigate CVE-2024-54151, upgrade @directus/api to version 23.2.0 or directus to version 11.3.0.

4

Can CVE-2024-54151 be exploited remotely?

Yes, CVE-2024-54151 can be exploited remotely by an unauthenticated user if the WebSocket authentication settings are misconfigured.

5

What are the risks of leaving CVE-2024-54151 unpatched?

Leaving CVE-2024-54151 unpatched exposes your application to unauthorized access and potential data manipulation by unauthenticated users.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203