Lookup for vulnerable packages by Package URL.

Purlpkg:npm/%40clerk/shared@2.21.1-snapshot.v20250211230514
Typenpm
Namespace@clerk
Nameshared
Version2.21.1-snapshot.v20250211230514
Qualifiers
Subpath
Is_vulnerabletrue
Next_non_vulnerable_version2.22.1
Latest_non_vulnerable_version4.8.3
Affected_by_vulnerabilities
0
url VCID-s19w-gzsh-qqhm
vulnerability_id VCID-s19w-gzsh-qqhm
summary
Official Clerk JavaScript SDKs: Middleware-based route protection bypass
## 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.
references
0
reference_url https://api.first.org/data/v1/epss?cve=CVE-2026-41248
reference_id
reference_type
scores
0
value 0.00096
scoring_system epss
scoring_elements 0.26604
published_at 2026-06-05T12:55:00Z
1
value 0.00096
scoring_system epss
scoring_elements 0.26594
published_at 2026-06-06T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2026-41248
1
reference_url https://github.com/clerk/javascript
reference_id
reference_type
scores
0
value 9.1
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
1
value CRITICAL
scoring_system generic_textual
scoring_elements
url https://github.com/clerk/javascript
2
reference_url https://github.com/clerk/javascript/security/advisories/GHSA-vqx2-fgx2-5wq9
reference_id
reference_type
scores
0
value 9.1
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
1
value CRITICAL
scoring_system cvssv3.1_qr
scoring_elements
2
value CRITICAL
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:T/P:M/B:A/M:M/D:T/2026-04-27T13:46:14Z/
url https://github.com/clerk/javascript/security/advisories/GHSA-vqx2-fgx2-5wq9
3
reference_url https://nvd.nist.gov/vuln/detail/CVE-2026-41248
reference_id
reference_type
scores
0
value 9.1
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
1
value CRITICAL
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2026-41248
4
reference_url https://github.com/advisories/GHSA-vqx2-fgx2-5wq9
reference_id GHSA-vqx2-fgx2-5wq9
reference_type
scores
0
value CRITICAL
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-vqx2-fgx2-5wq9
fixed_packages
0
url pkg:npm/%40clerk/shared@2.22.1
purl pkg:npm/%40clerk/shared@2.22.1
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/%2540clerk/shared@2.22.1
1
url pkg:npm/%40clerk/shared@3.47.4
purl pkg:npm/%40clerk/shared@3.47.4
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-uatw-95dq-tygq
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/%2540clerk/shared@3.47.4
2
url pkg:npm/%40clerk/shared@4.8.1
purl pkg:npm/%40clerk/shared@4.8.1
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-uatw-95dq-tygq
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/%2540clerk/shared@4.8.1
aliases CVE-2026-41248, GHSA-vqx2-fgx2-5wq9
risk_score 4.5
exploitability 0.5
weighted_severity 9.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-s19w-gzsh-qqhm
Fixing_vulnerabilities
Risk_score4.5
Resource_urlhttp://public2.vulnerablecode.io/packages/pkg:npm/%2540clerk/shared@2.21.1-snapshot.v20250211230514