8.8high
Cross-site Scripting in Directus
- Severity
- 8.8high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.03% (higher than 64% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-xmjj-3c76-5w84
Description
Directus is a real-time API and App dashboard for managing SQL database content. Prior to version 9.7.0, unauthorized JavaScript (JS) can be executed by inserting an iframe into the rich text html interface that links to a file uploaded HTML file that loads another uploaded JS file in its script tag. This satisfies the regular content security policy header, which in turn allows the file to run any arbitrary JS. This issue was resolved in version 9.7.0. As a workaround, disable the live embed in the what-you-see-is-what-you-get by adding `{ "media_live_embeds": false }` to the _Options Overrides_ option of the Rich Text HTML interface.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| directus directus | < 9.7.0 | CVE List |
| directus (npm) | before 9.7.0 | GitHub Advisory Database |
| rangerstudio directus | before 9.7.0 | NVD |
All scores
| GitHub_M | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| GitHub | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 4.3medium CVSS:2.0 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
Directus is a real-time API and App dashboard for managing SQL database content. Prior to version 9.7.0, unauthorized JavaScript (JS) can be executed by inserting an iframe into the rich text html interface that links to a file uploaded HTML file that loads another uploaded JS file in its script tag. This satisfies the regular content security policy header, which in turn allows the file to run any arbitrary JS. This issue was resolved in version 9.7.0. As a workaround, disable the live embed in the what-you-see-is-what-you-get by adding `{ "media_live_embeds": false }` to the _Options Overrides_ option of the Rich Text HTML interface.
GitHub Advisory Database
Impact
Unauthorized JavaScript can be executed by inserting an iframe into the rich text html interface that links to a file uploaded HTML file that loads another uploaded JS file in its script tag. This satisfies the regular content security policy header, which in turn allows the file to run any arbitrary JS.
Patches
This was resolved in https://github.com/directus/directus/pull/12020 which is released in 9.7.0
Workarounds
You can disable the live embed in the WYSIWYG by adding { "media_live_embeds": false } to the Options Overrides option of the Rich Text HTML interface.
References
https://github.com/directus/directus/pull/12020
For more information
If you have any questions or comments about this advisory:
- Open an issue in directus/directus
- Email us at security@directus.io
NVD (es)
Directus es una API y un panel de control de aplicaciones en tiempo real para administrar el contenido de las bases de datos SQL. En versiones anteriores a 9.7.0, podía ejecutarse JavaScript (JS) no autorizado mediante la inserción de un iframe en la interfaz html de texto enriquecido que enlaza con un archivo HTML cargado que carga otro archivo JS cargado en su etiqueta de script. Esto satisface el encabezado de la política de seguridad de contenido regular, que a su vez permite que el archivo ejecute cualquier JS arbitrario. Este problema fue resuelto en versión 9.7.0. Como medida de mitigación, deshabilite la inserción en vivo en "what-you-see-is-what-you-get" al añadir "{ "media_live_embeds": false }" a la opción _Options Overrides_ de la interfaz HTML de Texto Enriquecido
References
| https://github.com/directus/directus/security/advisories/GHSA-xmjj-3c76-5w84 | mitigation, third-party-advisory, web | |
| https://github.com/directus/directus/pull/12020 | issue-tracking, patch, third-party-advisory, web | |
| https://github.com/directus/directus/releases/tag/v9.7.0 | release-notes, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-24814 | advisory | |
| https://github.com/directus/directus | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-24814 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-xmjj-3c76-5w84 changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2022-24814 changed 2026-06-17 | Public domain |