Skip to content

chore(deps): update dependency @clerk/nextjs to v6.39.3 [security]#161

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-clerk-nextjs-vulnerability
Open

chore(deps): update dependency @clerk/nextjs to v6.39.3 [security]#161
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-clerk-nextjs-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Jul 9, 2025

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
@clerk/nextjs (source) 6.12.76.39.3 age confidence

@​clerk/backend Performs Insufficient Verification of Data Authenticity

CVE-2025-53548 / GHSA-9mp4-77wg-rwx9

More information

Details

Impact

Applications that use the verifyWebhook() helper to verify incoming Clerk webhooks are susceptible to accepting improperly signed webhook events.

Patches
  • @clerk/backend: the helper has been patched as of 2.4.0
  • @clerk/astro: the helper has been patched as of 2.10.2
  • @clerk/express: the helper has been patched as of 1.7.4
  • @clerk/fastify: the helper has been patched as of 2.4.4
  • @clerk/nextjs: the helper has been patched as of 6.23.3
  • @clerk/nuxt: the helper has been patched as of 1.7.5
  • @clerk/react-router: the helper has been patched as of 1.6.4
  • @clerk/remix: the helper has been patched as of 4.8.5
  • @clerk/tanstack-react-start: the helper has been patched as of 0.18.3
Resolution

The issue was resolved in @clerk/backend 2.4.0 by:

  • Properly parsing the webhook request's signatures and comparing them against the signature generated from the received event
Workarounds

If unable to upgrade, developers can workaround this issue by verifying webhooks manually, per this documentation.

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Official Clerk JavaScript SDKs: Middleware-based route protection bypass

CVE-2026-41248 / GHSA-vqx2-fgx2-5wq9

More information

Details

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:

// 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:

// 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 for the responsible disclosure of this vulnerability.

Severity

  • CVSS Score: 9.1 / 10 (Critical)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


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

CVE-2026-42349 / GHSA-w24r-5266-9c3c

More information

Details

Summary

has(), auth.protect(), and related authorization predicates in @clerk/shared, @clerk/nextjs, @clerk/backend, and other framework SDKs can return true for certain combined authorization checks when the result should be false, allowing a gated action to proceed for a user who does not satisfy the full set of requested conditions.

Sessions are not compromised and no existing user can be impersonated. The bypass is limited to the authorization decision returned by the predicate. clerkMiddleware continues to authenticate requests correctly, auth() reflects the real authentication state, and token verification is unaffected.

Who is affected

All apps that combine more than one authorization dimension in a single has() or auth.protect() call 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 developers understand whether their apps are potentially affected, but is not a reason to delay the upgrade.

This call shape can be bypassed if certain conditions are met: a has() or auth.protect() call that combines a reverification check with any of role, permission, feature, or plan, or that combines a billing check (feature or plan) with a role or permission check.

// Reverification combined with role / permission / feature / plan
await auth.protect({ permission: 'org:settings:delete', reverification: 'strict' });
const canAct = has({ role: 'org:admin', reverification: 'strict' });

// Billing (feature / plan) combined with role / permission
const canAct = has({ permission: 'org:admin', feature: 'premium' });

Single-condition checks are not affected and continue to fail closed as expected:

await auth.protect({ permission: 'org:settings:delete' });
has({ reverification: 'strict' });

The callback form of auth.protect is not affected unless the callback itself invokes one of the affected shapes:

await auth.protect(has => has({ permission: 'org:X' }) && has({ reverification: 'strict' }));

App patterns that rely only on single-condition checks, or that combine them via the callback form, are unaffected. Authentication, session state, and token verification continue to work correctly regardless of this bypass.

@clerk/shared is usually not imported directly in application code, but the fix lives there and reaches an app through its framework package. If developers import createCheckAuthorization from @clerk/shared directly, their apps are also affected. Run npm why @​clerk/shared (or the app's package manager's equivalent) to check the installed version.

Additional auth.protect() bypass

A second, related bypass lives in @clerk/nextjs: auth.protect() silently discarded authorization params (role, permission, feature, plan, reverification) whenever the same argument object also contained unauthenticatedUrl, unauthorizedUrl, or token.

Recommended actions

Upgrade to the latest patch release of the consuming app's framework package on its current major. Both Core 2 and Core 3 release lines have patches. See the "Affected packages" section above for the exact vulnerable ranges and patched versions per package.

If a consuming app pins @clerk/clerk-js directly, upgrade it to the patched version. Most apps load @clerk/clerk-js from Clerk's CDN through their framework package and will receive the fix automatically, with no upgrade step required.

Workaround

If developers cannot upgrade immediately, split combined has() or auth.protect() calls into sequential single-condition checks:

// Replace
await auth.protect({ permission: 'org:X', reverification: 'strict' });
// With
await auth.protect({ reverification: 'strict' });
await auth.protect({ permission: 'org:X' });

Each single-condition check fails closed as expected, so evaluating them independently and denying if either fails produces the correct result.

Timeline

This issue was reported on 18 APR 2026, patched on 22 APR 2026, and publicly disclosed on 22 APR 2026.

Thanks to AISafe for the responsible disclosure of this vulnerability.

Severity

  • CVSS Score: 7.6 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

clerk/javascript (@​clerk/nextjs)

v6.39.2

Compare Source

Patch Changes

v6.39.1

Compare Source

Patch Changes

v6.39.0

Compare Source

Minor Changes
  • Added support for JWT token format when creating and verifying machine-to-machine (M2M) tokens. This enables fully networkless verification when using the public JWT key. (#​7883) by @​wobsoriano

    Creating a JWT-format M2M token

    const clerkClient = createClerkClient({
      machineSecretKey: process.env.CLERK_MACHINE_SECRET_KEY,
    });
    
    const m2mToken = await clerkClient.m2m.createToken({
      tokenFormat: 'jwt',
    });
    
    console.log('M2M token created:', m2mToken.token);

    Verifying a token

    const clerkClient = createClerkClient({
      machineSecretKey: process.env.CLERK_MACHINE_SECRET_KEY,
    });
    
    const authHeader = req.headers.get('Authorization');
    const token = authHeader.slice(7);
    
    const verified = await clerkClient.m2m.verify(token);
    
    console.log('Verified M2M token:', verified);

    Networkless verification

    const clerkClient = createClerkClient({
      jwtKey: process.env.CLERK_JWT_KEY,
    });
    
    const authHeader = req.headers.get('Authorization');
    const token = authHeader.slice(7);
    
    const verified = await clerkClient.m2m.verify(token);
    
    console.log('Verified M2M token:', verified);
Patch Changes

v6.38.3

Compare Source

Patch Changes

v6.38.2

Compare Source

Patch Changes

v6.38.1

Compare Source

Patch Changes

v6.38.0

Compare Source

Minor Changes
  • Introduces MFA setup session task for handling require MFA after sign-in and sign-up (#​7851) by @​octoper
Patch Changes

v6.37.5

Compare Source

Patch Changes

v6.37.4

Compare Source

Patch Changes

v6.37.3

Compare Source

Patch Changes

v6.37.2

Compare Source

Patch Changes

v6.37.1

Compare Source

Patch Changes

v6.37.0

Compare Source

Minor Changes
  • Export useOrganizationCreationDefaults hook to fetch suggested organization name and logo from default naming rules (#​7690) by @​LauraBeatris
Patch Changes

v6.36.10

Compare Source

Patch Changes

v6.36.9

Compare Source

Patch Changes

v6.36.8

Compare Source

Patch Changes

v6.36.7

Compare Source

Patch Changes

v6.36.6

Compare Source

Patch Changes

v6.36.5

Compare Source

Patch Changes

v6.36.4

Compare Source

Patch Changes

v6.36.3

Compare Source

Patch Changes

v6.36.2

Compare Source

Patch Changes

v6.36.1

Compare Source

Patch Changes

v6.36.0

Compare Source

Minor Changes
Patch Changes

v6.35.6

Compare Source

Patch Changes

v6.35.5

Compare Source

Patch Changes

v6.35.4

Compare Source

Patch Changes

v6.35.3

Compare Source

Patch Changes

v6.35.2

Compare Source

Patch Changes

v6.35.1

Compare Source

Patch Changes

v6.35.0

Compare Source

Minor Changes
Patch Changes

v6.34.6

Compare Source

Patch Changes

v6.34.5

Compare Source

Patch Changes

v6.34.4

Compare Source

Patch Changes

v6.34.3

Compare Source

Patch Changes

v6.34.2

Compare Source

Patch Changes

v6.34.1

Compare Source

Patch Changes

v6.34.0

Compare Source

Minor Changes
Patch Changes

v6.33.7

Compare Source

Patch Changes

v6.33.6

Compare Source

Patch Changes

v6.33.5

Compare Source

Patch Changes

v6.33.4

Compare Source

Patch Changes

v6.33.3

Compare Source

Patch Changes

v6.33.2

Compare Source

Patch Changes

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jul 9, 2025

@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch 2 times, most recently from ce1fe4a to dcdd2bc Compare August 13, 2025 17:46
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from dcdd2bc to c177d77 Compare August 19, 2025 18:39
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from c177d77 to 0f65653 Compare August 31, 2025 10:20
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from 0f65653 to 9930d0c Compare September 25, 2025 15:33
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from 9930d0c to 009ec18 Compare October 22, 2025 01:11
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from 009ec18 to 56e4f1c Compare November 10, 2025 18:13
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from 56e4f1c to 882b0b6 Compare November 18, 2025 20:08
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from 882b0b6 to 497bc27 Compare December 3, 2025 16:58
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from 497bc27 to 0efa976 Compare December 31, 2025 16:07
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from 0efa976 to ccb0316 Compare January 8, 2026 19:59
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch 2 times, most recently from 5f6c171 to a54366a Compare January 23, 2026 17:08
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from a54366a to 6c4ca4e Compare February 2, 2026 18:33
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch 2 times, most recently from 4541f87 to 07d59d9 Compare February 17, 2026 20:28
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from 07d59d9 to 296ca2a Compare March 5, 2026 15:07
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from 296ca2a to 5790c5d Compare March 13, 2026 16:45
@renovate renovate Bot changed the title chore(deps): update dependency @clerk/nextjs to v6.23.3 [security] chore(deps): update dependency @clerk/nextjs to v6.23.3 [security] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate renovate Bot deleted the renovate/npm-clerk-nextjs-vulnerability branch March 27, 2026 02:13
@renovate renovate Bot changed the title chore(deps): update dependency @clerk/nextjs to v6.23.3 [security] - autoclosed chore(deps): update dependency @clerk/nextjs to v6.23.3 [security] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch 2 times, most recently from 5790c5d to 29d77a6 Compare March 30, 2026 21:48
@sonarqubecloud
Copy link
Copy Markdown

@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from 29d77a6 to 6572ee8 Compare April 8, 2026 20:07
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from 6572ee8 to 07833b3 Compare April 16, 2026 23:44
@renovate renovate Bot changed the title chore(deps): update dependency @clerk/nextjs to v6.23.3 [security] chore(deps): update dependency @clerk/nextjs to v6.39.2 [security] Apr 16, 2026
@renovate renovate Bot changed the title chore(deps): update dependency @clerk/nextjs to v6.39.2 [security] chore(deps): update dependency @clerk/nextjs to v6.39.2 [security] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
@renovate renovate Bot changed the title chore(deps): update dependency @clerk/nextjs to v6.39.2 [security] - autoclosed chore(deps): update dependency @clerk/nextjs to v6.39.2 [security] Apr 27, 2026
@renovate renovate Bot reopened this Apr 27, 2026
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from 07833b3 to 51a9426 Compare April 27, 2026 23:29
@renovate renovate Bot changed the title chore(deps): update dependency @clerk/nextjs to v6.39.2 [security] chore(deps): update dependency @clerk/nextjs to v6.39.2 [security] - autoclosed Apr 29, 2026
@renovate renovate Bot closed this Apr 29, 2026
@renovate renovate Bot changed the title chore(deps): update dependency @clerk/nextjs to v6.39.2 [security] - autoclosed chore(deps): update dependency @clerk/nextjs to v6.39.2 [security] Apr 29, 2026
@renovate renovate Bot reopened this Apr 29, 2026
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch 2 times, most recently from 51a9426 to 88f5f4d Compare April 29, 2026 21:02
@sonarqubecloud
Copy link
Copy Markdown

@renovate renovate Bot changed the title chore(deps): update dependency @clerk/nextjs to v6.39.2 [security] chore(deps): update dependency @clerk/nextjs to v6.39.3 [security] Apr 30, 2026
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from 88f5f4d to 2bb06df Compare May 12, 2026 09:51
@renovate renovate Bot force-pushed the renovate/npm-clerk-nextjs-vulnerability branch from 2bb06df to 80446df Compare May 28, 2026 17:59
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants