Loading...
Skip to main content

CVE-2026-41248 — Vulnerability in @clerk/astro — CVE Details

CRITICAL

Official Clerk JavaScript SDKs: Middleware-based route protection bypass

Published April 16, 2026Updated May 5, 2026Source: osv

Summary

## Summary `createRouteMatcher` in `@clerk/nextjs`, `@clerk/nuxt`, and `@clerk/astro` can be bypassed by certain crafted requests, allowing them to skip middleware gating and reach downstream handlers. Sessions are not compromised and no existing user can be impersonated - the bypass only affects the middleware-level gating decision. ## Who is affected All apps using `createRouteMatcher` should upgrade to the patched versions. Patches are drop-in with no API changes. The information below describes the scope of the bypass and helps you understand whether you are potentially affected, but is not a reason to delay the upgrade. Apps relying only on middleware gating via `createRouteMatcher` are affected, because a crafted request can skip middleware checks and reach downstream handlers (API routes, server components, etc.). This middleware pattern permits the bypass: ```ts // Next.js example, equivalent patterns exist in Nuxt and Astro const isProtectedRoute = createRouteMatcher(['/admin(.*)']); export default clerkMiddleware(async (auth, req) => { if (isProtectedRoute(req)) { await auth.protect(); } }); ``` That said, the bypass is limited to the middleware-level route-matching gate. `clerkMiddleware` still authenticates the request and `auth()` reflects the real authentication state of the caller. Auth checks performed inside your route handlers, server components, or server actions continue to work correctly and are not affected. Whether your app is affected in practice depends on whether you have those downstream checks. External APIs that authenticate each request with a token are also unaffected on those endpoints, since token verification runs independently. Additionally, this common middleware pattern correctly blocks the bypass at the middleware layer: ```ts // Next.js example, equivalent patterns exist in Nuxt and Astro const isPublicRoute = createRouteMatcher(['/docs(.*)']); export default clerkMiddleware(async (auth, req) => { if (!isPublicRoute(req)) { await auth.protect(); } }); ``` `@clerk/shared` is usually not imported directly in application code, but if you import `createPathMatcher` from an affected `@clerk/shared` version, you are also affected. Run `npm why @clerk/shared` (or your package manager's equivalent) to check your installed version. ## Recommended actions Install the patched version for your framework (pick the one matching your current major): **`@clerk/nextjs`** - v7.x: fixed in `7.2.1` - v6.x: fixed in `6.39.2` - v5.x: fixed in `5.7.6` **`@clerk/nuxt`** - v2.x: fixed in `2.2.2` - v1.x: fixed in `1.13.28` **`@clerk/astro`** - v3.x: fixed in `3.0.15` - v2.x: fixed in `2.17.10` - v1.x: fixed in `1.5.7` **`@clerk/shared`** - v4.x: fixed in `4.8.1` - v3.x: fixed in `3.47.4` - v2.x: fixed in `2.22.1` ## Workaround If you cannot upgrade immediately, adding server-side auth checks (`auth()`) inside your route handlers, server components, or server actions provides defense-in-depth against this bypass. ## Timeline This issue was reported on 13 APR 2026, patched on 15 APR 2026, and publicly disclosed on 15 APR 2026. Thanks to [Christiaan Swiers](https://github.com/YouGina) for the responsible disclosure of this vulnerability.

Advisory Timeline

  • First published April 16, 2026 (179 days ago).
  • Last revised May 5, 2026 — 19 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update @clerk/astro to 2.17.10 or later
npm install @clerk/astro@2.17.10
npm
Update @clerk/nuxt to 2.2.2 or later
npm install @clerk/nuxt@2.2.2
npm
Update @clerk/astro to 3.0.15 or later
npm install @clerk/astro@3.0.15
npm
Update @clerk/shared to 4.8.1 or later
npm install @clerk/shared@4.8.1
npm
Update @clerk/nuxt to 1.13.28 or later
npm install @clerk/nuxt@1.13.28
npm
Update @clerk/astro to 1.5.7 or later
npm install @clerk/astro@1.5.7
npm
Update @clerk/shared to 3.47.4 or later
npm install @clerk/shared@3.47.4
npm
Update @clerk/nextjs to 6.39.2 or later
npm install @clerk/nextjs@6.39.2
npm
Update @clerk/shared to 2.22.1 or later
npm install @clerk/shared@2.22.1
npm
Update @clerk/nextjs to 5.7.6 or later
npm install @clerk/nextjs@5.7.6
npm
Update @clerk/nextjs to 7.2.1 or later
npm install @clerk/nextjs@7.2.1

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (11)

Affects 1 ecosystem: npm (4).

PackageEcosystemAffectedFixed In
@clerk/astro
npm
All versions2.17.10
@clerk/nuxt
npm
All versions2.2.2
@clerk/astro
npm
All versions3.0.15
@clerk/shared
npm
All versions4.8.1
@clerk/nuxt
npm
All versions1.13.28
@clerk/astro
npm
All versions1.5.7
@clerk/shared
npm
All versions3.47.4
@clerk/nextjs
npm
All versions6.39.2
@clerk/shared
npm
All versions2.22.1
@clerk/nextjs
npm
All versions5.7.6
@clerk/nextjs
npm
All versions7.2.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Frequently Asked Questions

What is CVE-2026-41248?
Official Clerk JavaScript SDKs: Middleware-based route protection bypass This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.1/10).
How do I check if my project is affected by CVE-2026-41248?
CVE-2026-41248 affects @clerk/astro, @clerk/nuxt and @clerk/shared (and 1 more). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-41248 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.1

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-vqx2-fgx2-5wq9

Related CVEs

  • CVE-2026-107722
    CRITICAL

    fast-jwt: Incomplete patch of CVE-2026-34950: Non-whitespace key-prefix re-enables RSA→HS256 algorithm confusion

  • CVE-2026-108261
    CRITICAL

    TinaCMS admin preview iframe loads an attacker-controlled origin from the URL fragment

  • CVE-2025-53548
    HIGH

    @clerk/backend Performs Insufficient Verification of Data Authenticity

  • CVE-2026-42349
    HIGH

    Clerk has an authorization bypass when combining organization, billing, or reverification checks

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies