{"id":"CVE-2024-54151","aliases":["CVE-2024-54151","GHSA-849r-qrwj-8rv4"],"related":[],"kind":"vulnerability","state":"published","title":"Directus allows unauthenticated access to WebSocket events and operations","summary":"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 `WEBSOCKETS_GRAPHQL_AUTH` or `WEBSOCKETS_REST_AUTH` 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 `WEBSOCKETS_GRAPHQL_AUTH` or `WEBSOCKETS_REST_AUTH` 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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 `WEBSOCKETS_GRAPHQL_AUTH` or `WEBSOCKETS_REST_AUTH` 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 `WEBSOCKETS_GRAPHQL_AUTH` or `WEBSOCKETS_REST_AUTH` 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.","source":"cvelist"},{"lang":"en","text":"### Summary\nWhen setting `WEBSOCKETS_GRAPHQL_AUTH` or `WEBSOCKETS_REST_AUTH` to \"public\", an unauthenticated user is able to do any of the supported operations (CRUD, subscriptions) with full admin privileges.\n\n### Details\nAccountability 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.\n\n### PoC\n1. Start directus with\n```bash\nWEBSOCKETS_ENABLED=true\nWEBSOCKETS_GRAPHQL_AUTH=public\nWEBSOCKETS_REST_AUTH=public\n```\n\n2. Subscribe using GQL or REST or do any CRUD operation on a user created collection (system tables are not reachable with crud)\n```gql\nsubscription {\n    directus_users_mutated {\n        key\n        event\n        data {\n            id\n            email\n            first_name\n            last_name\n            password\n        }\n    }\n}\n```\nor\n```json\n{\n   \"type\": \"items\",\n   \"action\": \"read\",\n   \"collection\": \"your_collection_name\"\n}\n```\n3a. Open up the data studio as any user. Observe how the subscriber gets notified on each page navigation (because the users `last_page` gets updated, the `password` fields is properly redacted here)\n\n3b. Observe receiving all available items from the `your_collection_name` collection.\n\n### Impact\n\nThis impacts any Directus instance that has either `WEBSOCKETS_GRAPHQL_AUTH` or `WEBSOCKETS_REST_AUTH` set to `public` allowing unauthenticated users to subscribe for changes on any collection or do REST CRUD operations on user defined collections ignoring permissions.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Directus es una API en tiempo real y un panel de control de aplicaciones para administrar el contenido de bases de datos SQL. A partir de la versión 11.0.0 y anteriores a la versión 11.3.0, al configurar `WEBSOCKETS_GRAPHQL_AUTH` o `WEBSOCKETS_REST_AUTH` como \"público\", un usuario no autenticado puede realizar cualquiera de las operaciones admitidas (CRUD, suscripciones) con privilegios de administrador completos. Esto afecta a cualquier instancia de Directus que tenga `WEBSOCKETS_GRAPHQL_AUTH` o `WEBSOCKETS_REST_AUTH` configurado como `público`, lo que permite que los usuarios no autenticados se suscriban a los cambios en cualquier colección o realicen operaciones REST CRUD en colecciones definidas por el usuario ignorando los permisos. La versión 11.3.0 soluciona el problema.","source":"nvd"}],"published":"2024-12-09T20:40:54.000Z","modified":"2026-09-10T03:50:21.359Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-200"],"affected":[{"ranges":[{"version":">= 11.0.0, < 11.3.0","status":"affected"}],"vendor":"directus","product":"directus","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"11.0.0","status":"affected","fixed":"11.3.0"}],"ecosystem":"npm","package":"directus","purl":"pkg:npm/directus","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"22.2.0","status":"affected","fixed":"23.2.0"}],"ecosystem":"npm","package":"@directus/api","purl":"pkg:npm/%40directus/api","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"11.0.0","fixed":"11.3.0"}],"vendor":"monospace","product":"directus","cpe":"cpe:2.3:a:monospace:directus:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/directus/directus/security/advisories/GHSA-849r-qrwj-8rv4","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/directus/directus/commit/ce0397d16cf767b5293cd57f626c5349b5732a21","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-54151","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/directus/directus","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2024-12-10T16:10:28.432Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-54151","url":"https://www.cve.org/CVERecord?id=CVE-2024-54151","licence":"CVE Terms of Use","modified":"2024-12-10T17:09:06.417Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-849r-qrwj-8rv4","url":"https://github.com/advisories/GHSA-849r-qrwj-8rv4","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:21.359Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-54151","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-54151","licence":"Public domain","modified":"2026-06-17T08:09:51.933Z"}],"updatedAt":"2026-11-25T22:58:49.857Z","epss":{"score":0.00695,"percentile":0.54272,"date":"2026-12-02T12:00:21.000Z"}}