Skip to content

[Snyk] Security upgrade @clerk/nextjs from 4.31.8 to 6.12.1#2793

Open
adamlaska wants to merge 1 commit into
canaryfrom
snyk-fix-06cfe16acbacea0bfcf3041bc91841cb
Open

[Snyk] Security upgrade @clerk/nextjs from 4.31.8 to 6.12.1#2793
adamlaska wants to merge 1 commit into
canaryfrom
snyk-fix-06cfe16acbacea0bfcf3041bc91841cb

Conversation

@adamlaska

Copy link
Copy Markdown
Owner

snyk-top-banner

Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • examples/with-clerk/package.json

Vulnerabilities that will be fixed with an upgrade:

Issue
high severity Prototype Pollution
SNYK-JS-JSCOOKIE-17816999

Breaking Change Risk

Merge Risk: High

Notice: This assessment is enhanced by AI.


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Prototype Pollution

@adamlaska

Copy link
Copy Markdown
Owner Author

Merge Risk: High

This is a major upgrade from version 4 to 6, introducing significant breaking changes across two major versions. Developer action is required for migration.

v5.0.0 Breaking Changes

  • Environment Requirements: Support for Node.js 16 has been dropped, requiring Node.js 18.17.0 or later. React 18 or higher is also now required.
  • Middleware: The middleware architecture has changed. You must migrate from authMiddleware to the new clerkMiddleware function.
  • Environment Variables: CLERK_FRONTEND_API has been renamed to CLERK_PUBLISHABLE_KEY. The key's value is also different and must be updated from your Clerk Dashboard.
  • Imports: The @clerk/nextjs/app-beta and @clerk/nextjs/ssr import paths have been removed and consolidated into the main @clerk/nextjs export.

v6.0.0 Breaking Changes

  • Asynchronous auth(): The auth() and clerkClient() helpers are now asynchronous to support modern Next.js features. All calls must be updated to use await, for example: const { userId } = await auth().
  • auth.protect(): The auth().protect() method has been changed to auth.protect().
  • Static Rendering by Default: <ClerkProvider> no longer forces your entire application into dynamic rendering. Client components using useAuth() for server-side rendering will now require being wrapped in <ClerkProvider dynamic> to function correctly.
  • Removed APIs: Deprecated functions like authMiddleware, redirectToSignIn, and redirectToSignUp have been officially removed.

Recommendation: This upgrade requires significant code modifications. It is strongly advised to follow the official upgrade guides and use the automated codemod provided by Clerk to handle many of the asynchronous changes.

Source: Clerk v5 Upgrade Guide, Clerk v6 Upgrade Guide

Notice 🤖: This content was augmented using artificial intelligence. AI-generated content may contain errors and should be reviewed for accuracy before use.

@google-cla

google-cla Bot commented Jul 6, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

2 participants