VDB
Sign up
HIGH7.5

GHSA-9mp4-77wg-rwx9

@clerk/backend Performs Insufficient Verification of Data Authenticity

Quick fix

GHSA-9mp4-77wg-rwx9 — @clerk/backend: upgrade to the fixed version with the command below.

npm install @clerk/backend@2.4.0

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](https://clerk.com/docs/webhooks/overview#protect-your-webhooks-from-abuse).

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/@clerk/backend
Introduced in: 2.0.0Fixed in: 2.4.0
Fixnpm install @clerk/backend@2.4.0
npm/@clerk/astro
Introduced in: 2.9.0Fixed in: 2.10.2
Fixnpm install @clerk/astro@2.10.2
npm/@clerk/express
Introduced in: 1.6.0Fixed in: 1.7.4
Fixnpm install @clerk/express@1.7.4
npm/@clerk/fastify
Introduced in: 2.3.0Fixed in: 2.4.4
Fixnpm install @clerk/fastify@2.4.4
npm/@clerk/nextjs
Introduced in: 6.2.10Fixed in: 6.23.3
Fixnpm install @clerk/nextjs@6.23.3
npm/@clerk/nuxt
Introduced in: 1.7.0Fixed in: 1.7.5
Fixnpm install @clerk/nuxt@1.7.5
npm/@clerk/react-router
Introduced in: 1.5.0Fixed in: 1.6.4
Fixnpm install @clerk/react-router@1.6.4
npm/@clerk/remix
Introduced in: 4.8.0Fixed in: 4.8.5
Fixnpm install @clerk/remix@4.8.5
npm/@clerk/tanstack-react-start
Introduced in: 0.16.0Fixed in: 0.18.3
Fixnpm install @clerk/tanstack-react-start@0.18.3

References