Packages

HighVulnerabilityGHSA-gjxx-92w9-8v8fCVE-2026-34076Published 27 Mar 2026

Clerk: SSRF in the opt-in clerkFrontendApiProxy feature may leak secret keys to unintended host

Affected releases · @clerk/backend

  • 3.x3.0.0 – 3.2.2Fixed in 3.2.3

On 3.x, the newest line:

npm install @clerk/backend@3.2.3
  1. Not affected

    0.1.0 – 2.33.8

    327 releases

  2. Affected

    3.0.0 – 3.2.2

    6 releases

  3. Fixed

    3.2.3 – 3.26.1

    85 releases, latest

418 stable releases of @clerk/backend, oldest to newest.

Affected releases · @clerk/express

  • 2.x2.0.0 – 2.0.6Fixed in 2.0.7

On 2.x, the newest line:

npm install @clerk/express@2.0.7
  1. Not affected

    0.0.1 – 1.7.84

    220 releases

  2. Affected

    2.0.0 – 2.0.6

    6 releases

  3. Fixed

    2.0.7 – 2.1.82

    85 releases, latest

311 stable releases of @clerk/express, oldest to newest.

Affected releases · @clerk/fastify

  • 3.x3.1.0 – 3.1.4Fixed in 3.1.5

On 3.x, the newest line:

npm install @clerk/fastify@3.1.5
  1. Not affected

    0.1.1 – 3.0.1

    315 releases

  2. Affected

    3.1.0 – 3.1.4

    4 releases

  3. Fixed

    3.1.5 – 3.1.92

    85 releases, latest

404 stable releases of @clerk/fastify, oldest to newest.

Is your project affected?

Paste your package.json, or type the range you declare for @clerk/backend. It is read in your browser and sent nowhere.

Is your project affected?

Paste your package.json, or type the range you declare for @clerk/express. It is read in your browser and sent nowhere.

Is your project affected?

Paste your package.json, or type the range you declare for @clerk/fastify. It is read in your browser and sent nowhere.

What happens

Summary

The clerkFrontendApiProxy function in @clerk/backend is vulnerable to Server-Side Request Forgery (SSRF). An unauthenticated attacker can craft a request path that causes the proxy to send the application's Clerk-Secret-Key to an attacker-controlled server.

Affected packages

Only applications that have opted into the frontendApiProxy feature are affected. This feature is not enabled by default. Users of @clerk/nextjs are not affected due to how the framework handles repeated / in request paths.

PackageAffected versionsFixed version
@clerk/backend>= 3.0.0, <= 3.2.23.2.3
@clerk/express>= 2.0.0, <= 2.0.62.0.7
@clerk/hono>= 0.1.0, <= 0.1.40.1.5
@clerk/fastify>= 3.1.0, <= 3.1.43.1.5

Search your codebase for the frontendApiProxy option. If none of the patterns below appear in your code, you are not affected.

@clerk/express

app.use(clerkMiddleware({ frontendApiProxy: { enabled: true } }));

@clerk/hono

app.use('*', clerkMiddleware({ frontendApiProxy: { enabled: true } }));

@clerk/fastify

fastify.register(clerkPlugin, { frontendApiProxy: { enabled: true } });

@clerk/backend

import { clerkFrontendApiProxy } from '@clerk/backend/proxy';

A quick way to check across your entire project:

grep -r "frontendApiProxy\|clerkFrontendApiProxy" .

If there are no matches, you are not using this feature.

Recommended actions

Clerk's internal logs show no evidence of users utilizing the built-in proxy with the impacted versions. Despite that, if you are on an impacted version and use the built-in proxy we recommend upgrading and rotating your Clerk Secret Key immediately.

  1. Upgrade to the patched version of @clerk/backend (and @clerk/express, @clerk/hono, etc.)

  2. Rotate your Clerk Secret Key after upgrading - if an attacker exploited this vulnerability, they may have captured your key. Rotate it in the Clerk Dashboard under API Keys. You should deploy your application with the updated key before revoking the existing key.

  3. Audit access logs for requests to your proxy endpoint (/__clerk/ by default) containing double slashes in the path.

Credit

Discovered during an internal code audit.