<?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>@Fastify/Static - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/@fastify/static/</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>Fri, 24 Jul 2026 16:52:27 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/@fastify/static/feed.xml" rel="self" type="application/rss+xml"/><item><title>Fastify/static Vulnerable to Route Guard Bypass via Path Traversal</title><link>https://feed.craftedsignal.io/briefs/2026-07-fastify-static-path-traversal-bypass/</link><pubDate>Fri, 24 Jul 2026 16:52:27 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-fastify-static-path-traversal-bypass/</guid><description>The @fastify/static package is vulnerable to a route guard bypass via path traversal using non-leading '..' or '%2E%2E' path segments, allowing attackers to circumvent route-based middleware and access protected files that are served by the static plugin.</description><content:encoded><![CDATA[<p>The <code>@fastify/static</code> package, specifically versions up to 10.1.0, is susceptible to a route guard bypass vulnerability, tracked as CVE-2026-15074. This vulnerability enables attackers to bypass route-based middleware and access protected files served by the static plugin. The core issue lies in how the <code>find-my-way</code> router processes path segments, failing to normalize <code>..</code> or <code>%2E%2E</code> before matching routes. A previous fix for <code>GHSA-x428-ghpx-8j92</code> only addressed <code>%2F</code> variants, leaving these other path traversal sequences unhandled. Consequently, these sequences survive <code>decodeURI</code> and <code>encodeURI</code> operations, only to be collapsed later by <code>@fastify/send</code>'s <code>path.normalize</code> function, thereby circumventing initial security guards. This allows unauthorized access to sensitive files or directories intended to be protected by application-level routing.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts an HTTP GET request targeting a <code>fastify/static</code> endpoint that serves files. The request path includes a crafted sequence like <code>/foo/../deep/secret.txt</code> or <code>/foo/%2E%2E/deep/secret.txt</code>.</li>
<li>The request reaches the <code>find-my-way</code> router which is used by Fastify. Due to its inability to normalize <code>..</code> or <code>%2E%2E</code> segments before route matching, the crafted path bypasses specific, guarded routes (e.g., <code>/deep/*</code>).</li>
<li>The request instead matches the static plugin's broader catch-all route, allowing the request to proceed despite the intended route guard.</li>
<li>The <code>getPathnameForSend</code> helper, intended to prevent path traversal, processes the URI. However, it only adequately guards against <code>%2F</code> variants, allowing <code>..</code> and <code>%2E%2E</code> segments to remain in the path after <code>decodeURI</code> and <code>encodeURI</code> round-trips.</li>
<li>The request is then passed to <code>@fastify/send</code>, which internally uses <code>path.normalize</code>. This function collapses the <code>..</code> or <code>%2E%2E</code> segments, effectively resolving the path to <code>deep/secret.txt</code>.</li>
<li>The <code>fastify/static</code> plugin, now operating under the collapsed and normalized path, serves the <code>secret.txt</code> file from the <code>/deep/</code> directory, which was intended to be protected by route-based middleware.</li>
<li>The attacker successfully gains unauthorized access to the protected <code>secret.txt</code> file, circumventing the application's security controls.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The successful exploitation of CVE-2026-15074 leads to unauthorized access to files or directories that are otherwise protected by an application's route-based middleware or guards. This can result in sensitive information disclosure, including configuration files, source code, or proprietary data, which could further enable attackers to escalate privileges, gain persistence, or exfiltrate critical business assets. Any application relying on <code>@fastify/static</code> for serving static content with route-based access controls is at risk, potentially exposing a wide range of assets.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade <code>@fastify/static</code> to version 10.1.1 or higher immediately to patch CVE-2026-15074.</li>
<li>If immediate upgrade is not feasible, implement the workaround: avoid relying on route-based middleware or guards to protect files served by <code>@fastify/static</code>.</li>
<li>Deploy the Sigma rule provided in this brief to your SIEM to detect attempts at exploiting this path traversal vulnerability.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>fastify</category><category>nodejs</category><category>web-vulnerability</category><category>path-traversal</category><category>webserver</category></item></channel></rss>