<?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>Javascript-Sdk — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/javascript-sdk/</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>Fri, 17 Apr 2026 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/javascript-sdk/feed.xml" rel="self" type="application/rss+xml"/><item><title>Clerk JavaScript SDK Middleware Route Protection Bypass</title><link>https://feed.craftedsignal.io/briefs/2026-04-clerk-middleware-bypass/</link><pubDate>Fri, 17 Apr 2026 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-clerk-middleware-bypass/</guid><description>A vulnerability in `@clerk/nextjs`, `@clerk/nuxt`, and `@clerk/astro` allows crafted requests to bypass middleware gating via `createRouteMatcher`, potentially exposing protected routes if downstream authentication checks are absent.</description><content:encoded><![CDATA[<p>A critical vulnerability exists in the <code>@clerk/nextjs</code>, <code>@clerk/nuxt</code>, and <code>@clerk/astro</code> JavaScript SDKs, specifically within the <code>createRouteMatcher</code> function. This flaw, reported on April 13, 2026, and patched by April 15, 2026, allows attackers to craft specific HTTP requests that bypass the middleware-based route protection implemented using <code>createRouteMatcher</code>. This bypass allows unauthenticated or unauthorized users to access routes intended to be protected by the middleware, potentially leading to information disclosure or unauthorized actions if proper authentication checks are not implemented further down the application stack. The vulnerability affects applications using versions prior to the patched versions listed below.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker identifies an application using a vulnerable version of <code>@clerk/nextjs</code>, <code>@clerk/nuxt</code>, or <code>@clerk/astro</code> with middleware route protection implemented using <code>createRouteMatcher</code>.</li>
<li>The attacker crafts a malicious HTTP request designed to exploit the vulnerability in <code>createRouteMatcher</code>, effectively bypassing the intended route matching logic.</li>
<li>The crafted request is sent to the application, targeting a route protected by the vulnerable middleware.</li>
<li>Due to the bypass, the request proceeds past the middleware gate, reaching the downstream route handler (API route, server component, etc.).</li>
<li>If the downstream route handler lacks sufficient authentication or authorization checks, the attacker gains unauthorized access.</li>
<li>The attacker performs actions within the application based on the bypassed route, such as accessing sensitive data or triggering unintended functionality.</li>
<li>The attacker may then attempt further exploitation or lateral movement within the application.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This vulnerability allows attackers to bypass intended route protections. The impact is highly dependent on the application&rsquo;s design. If applications solely rely on <code>createRouteMatcher</code> for route protection and lack additional authentication checks in route handlers or server components, the consequences could be severe, including unauthorized access to sensitive data or functionality. While the vulnerability does not compromise existing sessions or allow for user impersonation, it weakens the overall security posture. It is important to note that external APIs which authenticate each request with a token are unaffected on those endpoints, since token verification runs independently.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Immediately upgrade to the patched versions of <code>@clerk/nextjs</code>, <code>@clerk/nuxt</code>, <code>@clerk/astro</code>, and <code>@clerk/shared</code> as outlined in the advisory to remediate the vulnerability.</li>
<li>Review all route handlers, server components, and server actions protected by <code>createRouteMatcher</code> to ensure they include server-side auth checks using <code>auth()</code> as a defense-in-depth measure.</li>
<li>Deploy the Sigma rule to detect potential exploitation attempts targeting the vulnerable <code>createRouteMatcher</code> function in your web server logs.</li>
<li>Monitor your application logs for unusual or unauthorized access attempts to protected routes, especially those matching the route patterns configured in <code>createRouteMatcher</code>.</li>
<li>Run <code>npm why @clerk/shared</code> (or your package manager&rsquo;s equivalent) to check the installed version of <code>@clerk/shared</code>.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>route-bypass</category><category>middleware-vulnerability</category><category>javascript-sdk</category></item></channel></rss>