CVE-2025-64747
JSON

5.5medium

Directus Vulnerable to Stored Cross-site Scripting

Severity
5.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.26% (higher than 19% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-vv2v-pw69-8crf

Description

Directus is a real-time API and App dashboard for managing SQL database content. A stored cross-site scripting (XSS) vulnerability exists in versions prior to 11.13.0 that allows users with `upload files` and `edit item` permissions to inject malicious JavaScript through the Block Editor interface. Attackers can bypass Content Security Policy (CSP) restrictions by combining file uploads with iframe srcdoc attributes, resulting in persistent XSS execution. Version 11.13.0 fixes the issue.

Affected

Product or packageVersionsReported by
directus directus< 11.13.0CVE List
directus (npm)before 11.13.0GitHub Advisory Database
monospace directusbefore 11.13.0NVD

All scores

GitHub_M5.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L
GitHub5.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L

Classification

CWE-20CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Directus is a real-time API and App dashboard for managing SQL database content. A stored cross-site scripting (XSS) vulnerability exists in versions prior to 11.13.0 that allows users with `upload files` and `edit item` permissions to inject malicious JavaScript through the Block Editor interface. Attackers can bypass Content Security Policy (CSP) restrictions by combining file uploads with iframe srcdoc attributes, resulting in persistent XSS execution. Version 11.13.0 fixes the issue.

GitHub Advisory Database
Summary

A stored cross-site scripting (XSS) vulnerability exists that allows users with upload files and edit item permissions to inject malicious JavaScript through the Block Editor interface. Attackers can bypass Content Security Policy (CSP) restrictions by combining file uploads with iframe srcdoc attributes, resulting in persistent XSS execution.

Details

The vulnerability arises from insufficient sanitization in the Block Editor interface when processing JSON content containing HTML elements. The attack requires two permissions:

  • upload files - To upload malicious JavaScript files
  • edit item - To create or modify content with the Block Editor

Attack Vector:

  1. JavaScript File Upload: Attackers upload a malicious JavaScript file via the files endpoint, obtaining a file ID accessible through the assets directory

  2. Block Editor Exploitation: Using a JSON field with Block Editor interface, attackers inject raw HTML containing an iframe with srcdoc attribute that references the uploaded file

  3. CSP Bypass: The iframe srcdoc technique circumvents existing CSP protections by creating a new document context that loads the uploaded script

The payload is injected through direct API manipulation (PATCH request) to bypass client-side validation, targeting the Block Editor's paragraph data structure within the JSON content field.

Impact

This vulnerability enables:

  • Persistent XSS - Malicious scripts execute whenever affected content is viewed
  • Session hijacking - Access to authentication tokens and cookies of users viewing the content
  • Administrative compromise - If administrators view infected content, their elevated privileges can be exploited
  • CSP bypass - Demonstrates ineffective security controls, potentially affecting other protections
  • Data exfiltration - Ability to steal sensitive information displayed in the application
  • Phishing attacks - Injection of convincing fake login forms or malicious redirects
NVD (es)

Directus es un panel de control de API y aplicación en tiempo real para gestionar contenido de base de datos SQL. Una vulnerabilidad de cross-site scripting (XSS) almacenado existe en versiones anteriores a 11.13.0 que permite a usuarios con permisos de 'subir archivos' y 'editar elemento' inyectar JavaScript malicioso a través de la interfaz del Editor de Bloques. Los atacantes pueden eludir las restricciones de la Política de Seguridad de Contenido (CSP) combinando cargas de archivos con atributos srcdoc de iframe, lo que resulta en una ejecución persistente de XSS. La versión 11.13.0 corrige el problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-64747 changed 2025-11-13CVE Terms of Use
GitHub Advisory DatabaseGHSA-vv2v-pw69-8crf changed 2025-11-14CC-BY-4.0
NVDCVE-2025-64747 changed 2026-10-19Public domain