Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in directus
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
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | directus | < 9.7.0 | 9.7.0 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-79- Platform
- npm
- Package
directus- Disclosed
- 05.04.2022
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-xmjj-3c76-5w84 - CC BY 4.0
Vulnerability history: directus
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 58
- First → latest
- 04.2022 07.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 2
- High 19
- Medium 34
- Low 3
Disclosures per year
- 2022: 4
- 2023: 8
- 2024: 14
- 2025: 17
- 2026: 15
-
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in directus this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.