<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Md-Fileserver — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/md-fileserver/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 21 May 2026 17:59:16 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/md-fileserver/feed.xml" rel="self" type="application/rss+xml"/><item><title>md-fileserver Stored/Reflected XSS Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2026-05-md-fileserver-xss/</link><pubDate>Thu, 21 May 2026 17:59:16 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-md-fileserver-xss/</guid><description>A cross-site scripting (XSS) vulnerability exists in md-fileserver's Markdown rendering logic, where user-supplied Markdown content containing raw HTML, including &lt;script&gt; tags, is processed and injected into the resulting page without sanitization, leading to arbitrary JavaScript execution and potential account takeover.</description><content:encoded><![CDATA[<p>md-fileserver versions prior to 1.10.3 are vulnerable to cross-site scripting (XSS) due to the application&rsquo;s Markdown rendering configuration which allows raw HTML. An attacker can inject malicious JavaScript code into Markdown files. When a user views the crafted Markdown, the injected script executes in the user&rsquo;s browser. This vulnerability arises from the application&rsquo;s explicit configuration to allow raw HTML within Markdown and the subsequent lack of sanitization before rendering the content in the HTML template. This can lead to session hijacking, credential theft, or other malicious activities. The vulnerability was reported on May 21, 2026.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker crafts a malicious Markdown file containing an embedded <code>&lt;script&gt;</code> tag or event handler (e.g., <code>&lt;img onerror=...&gt;</code>).</li>
<li>The attacker hosts or uploads this malicious Markdown file to the md-fileserver application.</li>
<li>A victim user navigates to the malicious Markdown file hosted on the md-fileserver.</li>
<li>The application&rsquo;s <code>lib/markd.js</code> renders the Markdown content without sanitizing the raw HTML, including the malicious <code>&lt;script&gt;</code> tag.</li>
<li>The rendered Markdown is injected into the HTML template <code>lib/pages/template.html</code> using <code>&lt;%= markdown %&gt;</code> without any sanitization or output encoding.</li>
<li>The victim&rsquo;s browser receives the HTML page with the embedded malicious JavaScript code.</li>
<li>The JavaScript code executes in the victim&rsquo;s browser within the security context of the md-fileserver domain.</li>
<li>The attacker achieves their objective, such as stealing session cookies, redirecting the user to a phishing site, or defacing the website.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows an attacker to execute arbitrary JavaScript in the victim’s browser. This can lead to session hijacking, account takeover, credential theft, defacement of the website, or exfiltration of sensitive data such as API tokens, CSRF tokens, or user information. All users who view Markdown content within the vulnerable application are potentially affected. Versions of <code>md-fileserver</code> prior to <code>1.10.3</code> are vulnerable.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade <code>md-fileserver</code> to version 1.10.3 or later to remediate the XSS vulnerability.</li>
<li>Deploy the Sigma rule <code>Detect md-fileserver XSS via oastify.com</code> to detect potential exploitation attempts by monitoring network connections to the exfiltration domain.</li>
<li>Implement proper HTML sanitization and output encoding in <code>lib/markd.js</code> to prevent the execution of arbitrary JavaScript code.</li>
<li>Disable the <code>html: true</code> option in the MarkdownIt configuration (config.js) if raw HTML rendering is not required.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>xss</category><category>reflected-xss</category><category>stored-xss</category><category>javascript</category><category>md-fileserver</category></item></channel></rss>