CVE-2022-24814
JSON

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 packageVersionsReported by
directus directus< 9.7.0CVE List
directus (npm)before 9.7.0GitHub Advisory Database
rangerstudio directusbefore 9.7.0NVD

All scores

GitHub_M8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
GitHub8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD4.3medium CVSS:2.0AV:N/AC:M/Au:N/C:N/I:P/A:N

Classification

CWE-79

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:

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

Sources

SourceRecordLicence
CVE ListCVE-2022-24814 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-xmjj-3c76-5w84 changed 2023-11-08CC-BY-4.0
NVDCVE-2022-24814 changed 2026-06-17Public domain