<?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 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/fastify/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 16 Apr 2026 15:17:34 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/fastify/feed.xml" rel="self" type="application/rss+xml"/><item><title>@fastify/middie Middleware Bypass Vulnerability (CVE-2026-33804)</title><link>https://feed.craftedsignal.io/briefs/2026-04-fastify-middie-bypass/</link><pubDate>Thu, 16 Apr 2026 15:17:34 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-fastify-middie-bypass/</guid><description>A middleware bypass vulnerability (CVE-2026-33804) exists in @fastify/middie versions 9.3.1 and earlier when the deprecated Fastify ignoreDuplicateSlashes option is enabled, potentially allowing unauthorized access.</description><content:encoded><![CDATA[<p>@fastify/middie, a Fastify middleware engine, is vulnerable to a significant security bypass. Specifically, versions 9.3.1 and earlier are susceptible when the deprecated Fastify <code>ignoreDuplicateSlashes</code> option is enabled. This vulnerability, identified as CVE-2026-33804, arises because the middleware&rsquo;s path matching logic fails to account for the duplicate slash normalization performed by Fastify&rsquo;s router. Consequently, crafted HTTP requests containing duplicate slashes can circumvent middleware authentication and authorization checks, potentially granting unauthorized access to protected resources. This vulnerability only affects applications that are actively using the deprecated <code>ignoreDuplicateSlashes</code> option. The recommended remediation is to upgrade to @fastify/middie version 9.3.2, which addresses this issue. Alternatively, disabling the <code>ignoreDuplicateSlashes</code> option can serve as a mitigation.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker identifies a Fastify application using @fastify/middie version 9.3.1 or earlier with the <code>ignoreDuplicateSlashes</code> option enabled.</li>
<li>The attacker crafts a malicious HTTP request targeting a protected resource. The request URI includes duplicate slashes (e.g., <code>/api//resource</code>).</li>
<li>The request is received by the Fastify server.</li>
<li>Fastify&rsquo;s router normalizes the duplicate slashes in the URI before passing it to the middleware.</li>
<li>The middleware&rsquo;s path matching logic fails to correctly handle the normalized URI due to the <code>ignoreDuplicateSlashes</code> setting.</li>
<li>As a result, the request bypasses the intended authentication and/or authorization checks implemented by the middleware.</li>
<li>The request reaches the targeted resource, which is processed by the application.</li>
<li>The attacker gains unauthorized access to the resource, potentially leading to data breaches, privilege escalation, or other malicious activities.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows attackers to bypass authentication and authorization controls, potentially gaining unauthorized access to sensitive data or functionality within the Fastify application. The severity of the impact depends on the nature of the protected resources and the extent of the attacker&rsquo;s access. This could lead to data breaches, privilege escalation, or other malicious activities. The number of potential victims is dependent on the number of applications using the vulnerable version of @fastify/middie with the <code>ignoreDuplicateSlashes</code> option enabled.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade @fastify/middie to version 9.3.2 or later to patch the vulnerability described in CVE-2026-33804.</li>
<li>Disable the <code>ignoreDuplicateSlashes</code> option in Fastify configurations as an alternative mitigation.</li>
<li>Deploy the Sigma rule <code>DetectFastifyMiddieBypassAttempt</code> to identify potential exploitation attempts based on duplicate slashes in the request URI.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>fastify</category><category>middie</category><category>middleware</category><category>bypass</category><category>cve-2026-33804</category><category>defense-evasion</category></item><item><title>Fastify Proxy Header Stripping Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2026-04-fastify-header-strip/</link><pubDate>Thu, 16 Apr 2026 01:02:59 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-fastify-header-strip/</guid><description>The `@fastify/reply-from` and `@fastify/http-proxy` libraries process the client's `Connection` header after adding headers, allowing attackers to strip proxy-added headers via the `Connection` header, leading to potential bypass of security controls.</description><content:encoded><![CDATA[<p>The <code>@fastify/reply-from</code> and <code>@fastify/http-proxy</code> libraries are vulnerable to a header stripping attack. This vulnerability stems from the incorrect processing order of the <code>Connection</code> header. The client&rsquo;s <code>Connection</code> header is processed <em>after</em> the proxy has added custom headers via the <code>rewriteRequestHeaders</code> function. This allows an attacker to retroactively remove headers added by the proxy by simply listing them in the <code>Connection</code> header. This affects any application leveraging these plugins where custom headers are injected for routing, access control, or other security purposes. All versions of both <code>@fastify/reply-from</code> and <code>@fastify/http-proxy</code> are affected. The vulnerability can be exploited without any special configuration. This undermines the intended function of a proxy as a trusted intermediary.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>A client crafts a request containing a <code>Connection</code> header.</li>
<li>The client sends the crafted request to a Fastify proxy server using <code>@fastify/reply-from</code> or <code>@fastify/http-proxy</code>.</li>
<li>The proxy receives the request and copies all client headers, including the <code>Connection</code> header.</li>
<li>The proxy, using <code>rewriteRequestHeaders</code>, adds custom headers (e.g., <code>x-forwarded-by</code>) to the request.</li>
<li>The proxy&rsquo;s transport handler processes the <code>Connection</code> header from the client.</li>
<li>Headers listed in the client&rsquo;s <code>Connection</code> header, including proxy-added headers, are stripped from the upstream request.</li>
<li>The modified request, with stripped headers, is forwarded to the upstream server.</li>
<li>The upstream server receives the request with missing headers, potentially bypassing security checks.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to bypass security controls implemented by the proxy. This includes bypassing proxy identification, circumventing access control mechanisms, and removing arbitrary headers. For example, an attacker can strip headers like <code>x-forwarded-by</code> to avoid detection, or remove authentication headers like <code>authorization</code> or custom access control headers like <code>x-internal-auth</code> to gain unauthorized access to resources. The number of victims depends on the prevalence of vulnerable Fastify deployments.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to patched versions of <code>@fastify/reply-from</code> and <code>@fastify/http-proxy</code> when available.</li>
<li>As a workaround, avoid using <code>rewriteRequestHeaders</code> to inject security-critical headers into requests.</li>
<li>Implement input validation to sanitize or reject requests containing a <code>Connection</code> header that attempts to remove security-sensitive headers.</li>
<li>Monitor web server logs for requests containing <code>Connection</code> headers listing custom or security-related headers as a sign of potential exploitation (see Sigma rule below).</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>fastify</category><category>header stripping</category><category>proxy vulnerability</category></item><item><title>Fastify Body Schema Validation Bypass via Leading Space in Content-Type Header</title><link>https://feed.craftedsignal.io/briefs/2026-06-27-fastify-validation-bypass/</link><pubDate>Wed, 15 Apr 2026 19:26:39 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-06-27-fastify-validation-bypass/</guid><description>Fastify v5.x is vulnerable to a body schema validation bypass, allowing attackers to circumvent request body validation by prepending a single space to the Content-Type header, potentially compromising data integrity and security constraints.</description><content:encoded><![CDATA[<p>Fastify v5.x (specifically versions 5.3.2 through 5.8.4) contains a vulnerability where request body validation schemas specified via <code>schema.body.content</code> can be bypassed by prepending a single space character (<code>\x20</code>) to the <code>Content-Type</code> header. This flaw, assigned CVE-2026-33806, arises from inconsistent handling of the Content-Type header during parsing and validation.  The body is parsed correctly as JSON, but schema validation is skipped entirely. This is a regression introduced by commit <code>f3d2bcb</code> (April 18, 2025), a fix for CVE-2025-32442. This vulnerability allows attackers to send malicious payloads that bypass intended data integrity and security checks.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker identifies a Fastify application using <code>schema.body.content</code> for request body validation.</li>
<li>The attacker crafts a malicious HTTP POST request with a JSON payload designed to violate the validation schema (e.g., exceeding allowed amount or injecting invalid admin value).</li>
<li>The attacker prepends a single space character to the <code>Content-Type</code> header (e.g., <code> Content-Type: application/json</code>).</li>
<li>The Fastify server parses the <code>Content-Type</code> header using <code>lib/validation.js</code> which splits the string, resulting in an empty string content type.</li>
<li>The server fails to locate a validator associated with the empty string content type.</li>
<li>Request body validation is skipped, and the malicious payload is processed by the application.</li>
<li>The application processes the invalid data, potentially leading to unauthorized actions or data corruption.</li>
<li>The attacker achieves their objective, such as transferring an excessive amount, manipulating data, or gaining unauthorized privileges.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This vulnerability affects Fastify applications using <code>schema.body.content</code> for request body validation. By prepending a single space to the Content-Type header, attackers can bypass these validations. Successful exploitation allows an attacker to inject malicious payloads, leading to data corruption, unauthorized access, or other security breaches. While the exact number of victims is unknown, any application within the vulnerable version range is susceptible. This vulnerability requires no authentication and has zero complexity — it is a single-character modification to an HTTP header.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the recommended fix by adding <code>trimStart()</code> before the split in <code>getEssenceMediaType</code> within the Fastify framework to address CVE-2026-33806.</li>
<li>Deploy the Sigma rule &ldquo;Detect Fastify Validation Bypass Attempt&rdquo; to your SIEM to identify attempts to exploit this vulnerability by monitoring for requests with leading spaces in the Content-Type header.</li>
<li>Upgrade Fastify to a version beyond 5.8.4 to mitigate CVE-2026-33806.</li>
<li>Review all Fastify routes that use <code>schema.body.content</code> for potential vulnerabilities related to content-type validation.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>fastify</category><category>validation-bypass</category><category>webserver</category></item></channel></rss>