ITADN

Update dependency @clerk/nextjs to v7.2.1 [SECURITY]

#163Pull Requestrenovate[bot] 创建于 2026-04-19
R
renovate[bot]commented
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@clerk/nextjs](https://clerk.com/) ([source](https://redirect.github.com/clerk/javascript/tree/HEAD/packages/nextjs)) | [`7.0.1` → `7.2.1`](https://renovatebot.com/diffs/npm/@clerk%2fnextjs/7.0.1/7.2.1) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@clerk%2fnextjs/7.2.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@clerk%2fnextjs/7.0.1/7.2.1?slim=true) | ### GitHub Vulnerability Alerts #### [GHSA-vqx2-fgx2-5wq9](https://redirect.github.com/clerk/javascript/security/advisories/GHSA-vqx2-fgx2-5wq9) ## 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 @&#8203;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://redirect.github.com/YouGina) 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` --- ### Release Notes <details> <summary>clerk/javascript (@&#8203;clerk/nextjs)</summary> ### [`v7.2.1`](https://redirect.github.com/clerk/javascript/blob/HEAD/packages/nextjs/CHANGELOG.md#721) ##### Patch Changes - Normalize URL paths in `createPathMatcher` to prevent route protection bypass ([#&#8203;8311](https://redirect.github.com/clerk/javascript/pull/8311)) by [@&#8203;nikosdouvlis](https://redirect.github.com/nikosdouvlis) - Updated dependencies \[[`b0b6675`](https://redirect.github.com/clerk/javascript/commit/b0b6675bad09eb3dd5b711ad5b45539162664c7a)]: - [@&#8203;clerk/shared](https://redirect.github.com/clerk/shared)@&#8203;4.8.1 - [@&#8203;clerk/backend](https://redirect.github.com/clerk/backend)@&#8203;3.2.11 - [@&#8203;clerk/react](https://redirect.github.com/clerk/react)@&#8203;6.4.1 ### [`v7.2.0`](https://redirect.github.com/clerk/javascript/blob/HEAD/packages/nextjs/CHANGELOG.md#720) ##### Minor Changes - Introduce internal `<OAuthConsent />` component for rendering a zero-config OAuth consent screen on an OAuth authorize redirect page. ([#&#8203;8289](https://redirect.github.com/clerk/javascript/pull/8289)) by [@&#8203;wobsoriano](https://redirect.github.com/wobsoriano) Usage example: ```tsx import { OAuthConsent } from '@&#8203;clerk/nextjs'; export default function OAuthConsentPage() { return <OAuthConsent />; } ``` ##### Patch Changes - Updated dependencies \[[`dc2de16`](https://redirect.github.com/clerk/javascript/commit/dc2de16480086f376449d452d31ae0d2a319af17)]: - [@&#8203;clerk/react](https://redirect.github.com/clerk/react)@&#8203;6.4.0 - [@&#8203;clerk/shared](https://redirect.github.com/clerk/shared)@&#8203;4.8.0 - [@&#8203;clerk/backend](https://redirect.github.com/clerk/backend)@&#8203;3.2.10 ### [`v7.1.0`](https://redirect.github.com/clerk/javascript/blob/HEAD/packages/nextjs/CHANGELOG.md#710) [Compare Source](https://redirect.github.com/clerk/javascript/compare/@clerk/nextjs@7.0.12...@clerk/nextjs@7.1.0) ##### Minor Changes - Introduce internal `useOAuthConsent()` hook for fetching OAuth consent screen metadata for the signed-in user. ([#&#8203;8286](https://redirect.github.com/clerk/javascript/pull/8286)) by [@&#8203;jfoshee](https://redirect.github.com/jfoshee) ##### Patch Changes - Bump `next` devDependency to `15.5.15` to pick up the fix for CVE-2026-23869, a high-severity (CVSS 7.5) denial-of-service vulnerability in React Server Components. If you use the Next.js App Router, we recommend upgrading to Next.js `15.5.15` or `16.2.3`. ([#&#8203;8257](https://redirect.github.com/clerk/javascript/pull/8257)) by [@&#8203;renovate](https://redirect.github.com/apps/renovate) - Updated dependencies \[[`3fd586d`](https://redirect.github.com/clerk/javascript/commit/3fd586d171e9c281c4b96f620ee9070b47ba00f4), [`f9ff9e9`](https://redirect.github.com/clerk/javascript/commit/f9ff9e937d70713abf96fdd92071cd6e84b8eb80)]: - [@&#8203;clerk/react](https://redirect.github.com/clerk/react)@&#8203;6.3.0 - [@&#8203;clerk/shared](https://redirect.github.com/clerk/shared)@&#8203;4.7.0 - [@&#8203;clerk/backend](https://redirect.github.com/clerk/backend)@&#8203;3.2.9 ### [`v7.0.12`](https://redirect.github.com/clerk/javascript/blob/HEAD/packages/nextjs/CHANGELOG.md#7012) [Compare Source](https://redirect.github.com/clerk/javascript/compare/@clerk/nextjs@7.0.11...@clerk/nextjs@7.0.12) ##### Patch Changes - Re-exports `useAPIKeys()` hook. ([#&#8203;8269](https://redirect.github.com/clerk/javascript/pull/8269)) by [@&#8203;wobsoriano](https://redirect.github.com/wobsoriano) Usage example: ```tsx 'use client'; import { useAPIKeys } from '@&#8203;clerk/nextjs'; export default function CustomAPIKeys() { const { data, isLoading, page, pageCount, fetchNext, fetchPrevious } = useAPIKeys({ pageSize: 10, initialPage: 1, }); if (isLoading) return <div>Loading...</div>; return ( <ul> {data?.map(key => ( <li key={key.id}>{key.name}</li> ))} </ul> ); } ``` - Updated dependencies \[[`fdac10e`](https://redirect.github.com/clerk/javascript/commit/fdac10e96ad60c0176cde4e1e3ddc89e40cd0a15), [`4e3cb0a`](https://redirect.github.com/clerk/javascript/commit/4e3cb0abed1f8aa1cba032c15da3a94a49162b0c), [`aa32bbc`](https://redirect.github.com/clerk/javascript/commit/aa32bbc94e76ea726056810885208c59269b2d2b)]: - [@&#8203;clerk/shared](https://redirect.github.com/clerk/shared)@&#8203;4.6.0 - [@&#8203;clerk/backend](https://redirect.github.com/clerk/backend)@&#8203;3.2.8 - [@&#8203;clerk/react](https://redirect.github.com/clerk/react)@&#8203;6.2.1 ### [`v7.0.11`](https://redirect.github.com/clerk/javascript/blob/HEAD/packages/nextjs/CHANGELOG.md#7011) [Compare Source](https://redirect.github.com/clerk/javascript/compare/@clerk/nextjs@7.0.8...@clerk/nextjs@7.0.11) ##### Patch Changes - Updated dependencies \[[`bedad42`](https://redirect.github.com/clerk/javascript/commit/bedad42b3a3bce899e23b38ef0b0f8d5b8d1149d)]: - [@&#8203;clerk/backend](https://redirect.github.com/clerk/backend)@&#8203;3.2.7 ### [`v7.0.8`](https://redirect.github.com/clerk/javascript/blob/HEAD/packages/nextjs/CHANGELOG.md#708) [Compare Source](https://redirect.github.com/clerk/javascript/compare/@clerk/nextjs@7.0.7...@clerk/nextjs@7.0.8) ##### Patch Changes - Updated dependencies \[[`9a00a1c`](https://redirect.github.com/clerk/javascript/commit/9a00a1cc9753a49ea96e520a8e4918075f3efff4), [`00715a6`](https://redirect.github.com/clerk/javascript/commit/00715a6d9ea8cf412c989e870a3eff03973fa505), [`39ee042`](https://redirect.github.com/clerk/javascript/commit/39ee0425ef4d6a21e9b232e2aa126f45a9cf3cff), [`b8c73d3`](https://redirect.github.com/clerk/javascript/commit/b8c73d34ee30616e63b6320e7a8724630670eeb3), [`1827b50`](https://redirect.github.com/clerk/javascript/commit/1827b50a6ef9ab14c48cddc120796a9bf3c965b6), [`7707a31`](https://redirect.github.com/clerk/javascript/commit/7707a31eb1977d0c5f2bb72f7ad0768606a55d16), [`849f198`](https://redirect.github.com/clerk/javascript/commit/849f1980fbfa031f2b62855788ce75eba24c789c), [`7c7d025`](https://redirect.github.com/clerk/javascript/commit/7c7d025ceda5fb2dde126ea1143ac3113f6403c7)]: - [@&#8203;clerk/shared](https://redirect.github.com/clerk/shared)@&#8203;4.4.0 - [@&#8203;clerk/backend](https://redirect.github.com/clerk/backend)@&#8203;3.2.4 - [@&#8203;clerk/react](https://redirect.github.com/clerk/react)@&#8203;6.1.4 ### [`v7.0.7`](https://redirect.github.com/clerk/javascript/blob/HEAD/packages/nextjs/CHANGELOG.md#707) [Compare Source](https://redirect.github.com/clerk/javascript/compare/@clerk/nextjs@7.0.6...@clerk/nextjs@7.0.7) ##### Patch Changes - Updated dependencies \[[`7027e97`](https://redirect.github.com/clerk/javascript/commit/7027e9712b17728df5a89691f60e1fff34f06f46), [`0288931`](https://redirect.github.com/clerk/javascript/commit/028893102b91e3fc8e4e0ca5b993bbb8f23fd1d1), [`3efdd2c`](https://redirect.github.com/clerk/javascript/commit/3efdd2cbd36bfe1002e1fbdb0f3a633d46a9287a), [`486545c`](https://redirect.github.com/clerk/javascript/commit/486545c17db652e003f56ffdecf6f31dd77a1b02)]: - [@&#8203;clerk/react](https://redirect.github.com/clerk/react)@&#8203;6.1.3 - [@&#8203;clerk/backend](https://redirect.github.com/clerk/backend)@&#8203;3.2.3 ### [`v7.0.6`](https://redirect.github.com/clerk/javascript/blob/HEAD/packages/nextjs/CHANGELOG.md#706) [Compare Source](https://redirect.github.com/clerk/javascript/compare/@clerk/nextjs@7.0.5...@clerk/nextjs@7.0.6) ##### Patch Changes - Updated dependencies \[[`f0533a2`](https://redirect.github.com/clerk/javascript/commit/f0533a26db17066a7dcc7992d9589ba3a60cc5b4), [`e00ec97`](https://redirect.github.com/clerk/javascript/commit/e00ec97895640db358af5a9df5d03e83f28f5a27)]: - [@&#8203;clerk/shared](https://redirect.github.com/clerk/shared)@&#8203;4.3.2 - [@&#8203;clerk/backend](https://redirect.github.com/clerk/backend)@&#8203;3.2.2 - [@&#8203;clerk/react](https://redirect.github.com/clerk/react)@&#8203;6.1.2 ### [`v7.0.5`](https://redirect.github.com/clerk/javascript/blob/HEAD/packages/nextjs/CHANGELOG.md#705) [Compare Source](https://redirect.github.com/clerk/javascript/compare/@clerk/nextjs@7.0.4...@clerk/nextjs@7.0.5) ##### Patch Changes - Updated dependencies \[[`b9cb6e5`](https://redirect.github.com/clerk/javascript/commit/b9cb6e576bf6af5662fcc624cf2de76120a14565)]: - [@&#8203;clerk/shared](https://redirect.github.com/clerk/shared)@&#8203;4.3.1 - [@&#8203;clerk/react](https://redirect.github.com/clerk/react)@&#8203;6.1.1 - [@&#8203;clerk/backend](https://redirect.github.com/clerk/backend)@&#8203;3.2.1 ### [`v7.0.4`](https://redirect.github.com/clerk/javascript/blob/HEAD/packages/nextjs/CHANGELOG.md#704) [Compare Source](https://redirect.github.com/clerk/javascript/compare/@clerk/nextjs@7.0.2...@clerk/nextjs@7.0.4) ##### Patch Changes - Updated dependencies \[[`1f43bf7`](https://redirect.github.com/clerk/javascript/commit/1f43bf7a795c2ff1be3cfd455077976fb937075e), [`766ae5b`](https://redirect.github.com/clerk/javascript/commit/766ae5bc9062013cc00d3f5e0c531eb2cde7803f), [`de1386f`](https://redirect.github.com/clerk/javascript/commit/de1386fc90a3e8c2bab515b693c84a1b383525d3), [`02ff4f2`](https://redirect.github.com/clerk/javascript/commit/02ff4f2c151c2c526e72039d95b5bd74834d3286)]: - [@&#8203;clerk/backend](https://redirect.github.com/clerk/backend)@&#8203;3.2.0 - [@&#8203;clerk/shared](https://redirect.github.com/clerk/shared)@&#8203;4.3.0 - [@&#8203;clerk/react](https://redirect.github.com/clerk/react)@&#8203;6.1.0 ### [`v7.0.2`](https://redirect.github.com/clerk/javascript/blob/HEAD/packages/nextjs/CHANGELOG.md#702) [Compare Source](https://redirect.github.com/clerk/javascript/compare/@clerk/nextjs@7.0.1...@clerk/nextjs@7.0.2) ##### Patch Changes - Fix build failures when using `cacheComponents: true` with dynamic routes (e.g. `[id]`) ([#&#8203;7989](https://redirect.github.com/clerk/javascript/pull/7989)) by [@&#8203;jacekradko](https://redirect.github.com/jacekradko) - Updated dependencies \[[`a8c64cc`](https://redirect.github.com/clerk/javascript/commit/a8c64cce3735483230d785fbd916859cb630f752), [`776ee1b`](https://redirect.github.com/clerk/javascript/commit/776ee1b3f3a576976b43352a93b6988340e83353), [`7fb870d`](https://redirect.github.com/clerk/javascript/commit/7fb870d37a8c153e9b0e6313b1d38ff53bc2f49b), [`398b7f9`](https://redirect.github.com/clerk/javascript/commit/398b7f906956e4b1f3fb1d8fb02c787e18309b53), [`09cb6d4`](https://redirect.github.com/clerk/javascript/commit/09cb6d4d45286cf4e657b880696bf0ff81a8a3e8), [`09088ed`](https://redirect.github.com/clerk/javascript/commit/09088edeba8eaa299130f52e6aa26f2b2771e7e3)]: - [@&#8203;clerk/backend](https://redirect.github.com/clerk/backend)@&#8203;3.0.2 - [@&#8203;clerk/shared](https://redirect.github.com/clerk/shared)@&#8203;4.1.0 - [@&#8203;clerk/react](https://redirect.github.com/clerk/react)@&#8203;6.0.2 </details> --- ### 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/fuma-nama/fuma-comment). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMjMuOCIsInVwZGF0ZWRJblZlciI6IjQzLjEyMy44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
合并状态:未合并 1 条评论