Skip to content

CVE-2026-42349 - Clerk combined authorization bypass

Clerk SDK authorization predicates can return an allow decision for some multi-condition checks even when the user does not satisfy every requested condition. The bug affects combined uses of has() and auth.protect() that mix authorization dimensions such as organization role, permission, billing plan, feature entitlement, or reverification.

Authentication and token verification are not the broken boundary. The risk is that a route, server action, API handler, billing-gated feature, admin action, or agent-control surface may proceed because a combined predicate returned true when one of the component checks should have failed.

This is especially relevant for agentic SaaS products: organization admin actions, paid-plan controls, high-risk tool enablement, connector approvals, and reverified operations should fail closed when any required dimension is missing.

Affected versions

Patch the Clerk framework package the application actually consumes, and patch direct @clerk/shared / @clerk/clerk-js pins where present.

PackageVulnerable versionsFixed versions
@clerk/astro>=2.0.0, <=2.17.10; >=3.0.0, <=3.0.172.17.11, 3.0.18
@clerk/backend>=2.0.0, <=2.33.2; >=3.0.0, <=3.2.132.33.3, 3.2.14
@clerk/chrome-extension>=1.3.5, <=2.9.14; >=3.0.0, <=3.1.142.9.15, 3.1.15
@clerk/clerk-expo>=2.2.11, <=2.19.352.19.36
@clerk/clerk-js>=5.22.0, <=5.125.9; >=6.0.0, <=6.7.45.125.10, 6.7.5
@clerk/clerk-react>=5.9.0, <=5.61.55.61.6
@clerk/expo>=3.0.0, <=3.2.13.2.2
@clerk/express>=0.1.0, <=1.7.78; >=2.0.0, <=2.1.51.7.79, 2.1.6
@clerk/fastify>=1.0.42, <=2.6.30; >=3.0.0, <=3.1.152.6.31, 3.1.16
@clerk/hono>=0.0.2, <=0.1.150.1.16
@clerk/nextjs>=6.0.0, <=6.39.2; >=7.0.0, <=7.2.36.39.3, 7.2.4
@clerk/nuxt>=1.0.0, <=1.13.28; >=2.0.0, <=2.2.41.13.29, 2.2.5
@clerk/react>=6.0.0, <=6.4.26.4.3
@clerk/react-router>=0.0.1, <=2.4.12; >=3.0.0, <=3.1.32.4.13, 3.1.4
@clerk/shared>=3.0.0, <=3.47.4; >=4.0.0, <=4.8.23.47.5, 4.8.3
@clerk/tanstack-react-start>=0.0.1, <=0.29.10; >=1.0.0, <=1.1.30.29.11, 1.1.4
@clerk/vue>=1.0.0, <=1.17.20; >=2.0.0, <=2.0.151.17.21, 2.0.16

Indicator-of-exposure

  • The repository depends on any affected Clerk package through npm, pnpm, Yarn, Bun, a lockfile, Docker image, generated dependency manifest, or SBOM.
  • Application code calls has() or auth.protect() with more than one authorization dimension in the same predicate object.
  • Combined checks include reverification plus role, permission, feature, or plan.
  • Combined checks include a billing dimension (feature or plan) plus role or permission.
  • @clerk/nextjs code calls auth.protect() with authorization parameters in the same object as redirect or token options such as unauthenticatedUrl, unauthorizedUrl, or token.
  • Sensitive actions depend on those predicates: organization administration, invite/member management, billing-plan features, connector approval, tool enablement, key rotation, data export, destructive actions, or agent workflow promotion.

Quick checks:

rg -n "@clerk/|from ['\"]@clerk|has\\(|auth\\.protect\\(|reverification|unauthenticatedUrl|unauthorizedUrl|feature:|plan:|permission:|role:" .
npm ls @clerk/shared @clerk/nextjs @clerk/backend @clerk/clerk-js
pnpm why @clerk/shared @clerk/nextjs @clerk/backend @clerk/clerk-js
yarn why @clerk/shared @clerk/nextjs @clerk/backend @clerk/clerk-js

Remediation strategy

  • Upgrade the Clerk framework SDK on the application’s current major line to the fixed version listed above. Regenerate lockfiles and rebuild deployment artifacts.
  • Upgrade direct @clerk/shared and @clerk/clerk-js pins when present.
  • During rollout, split combined has() or auth.protect() checks into sequential single-condition checks so each condition fails closed on its own.
  • For @clerk/nextjs, keep authorization checks separate from redirect or token options unless the upgraded package has already been deployed.
  • Add regression tests for the application’s most sensitive gates, especially checks that combine organization permission, admin role, plan/feature entitlement, and reverification.
  • Review logs for sensitive actions that were authorized through affected combined predicates during the vulnerable window.

The prompt

Model context: this prompt was generated by GPT 5.5 Extra High reasoning.

You are remediating CVE-2026-42349 (Clerk combined authorization predicate
bypass). Produce exactly one output:

- A reviewer-ready PR/change request that upgrades affected Clerk packages,
  removes reachable combined-predicate bypass risk, adds regression coverage,
  and documents operator review, or
- TRIAGE.md if this repository does not own an affected Clerk application or
  cannot make a safe patch.

## Rules

- Scope only CVE-2026-42349 and directly related Clerk authorization checks.
- Do not weaken authentication, organization authorization, billing
  entitlement, feature entitlement, reverification, or redirect behavior to
  preserve compatibility.
- Do not log Clerk session tokens, JWTs, cookies, OAuth tokens, organization
  secrets, API keys, billing data, or user PII.
- Do not rely only on dependency updates if sensitive combined authorization
  predicates are present and untested.
- Do not auto-merge.

## Steps

1. Inventory every Clerk dependency in package manifests, lockfiles, workspace
   manifests, Dockerfiles, deployment images, generated dependency manifests,
   and SBOMs.
2. Determine whether any resolved package is in an affected CVE-2026-42349
   range, especially:
   - `@clerk/nextjs`;
   - `@clerk/backend`;
   - `@clerk/shared`;
   - `@clerk/clerk-js`;
   - framework wrappers such as Astro, Express, Fastify, Hono, Nuxt, React
     Router, TanStack React Start, Vue, Expo, and Chrome Extension packages.
3. Search application code for Clerk authorization predicates:
   - `has(...)`;
   - `auth.protect(...)`;
   - `createCheckAuthorization`;
   - `reverification`;
   - `role`, `permission`, `feature`, and `plan` checks;
   - `unauthenticatedUrl`, `unauthorizedUrl`, or `token` passed to
     `auth.protect()`.
4. Identify sensitive routes, server actions, API handlers, webhooks, jobs, or
   agent-control paths protected by combined predicate objects. Treat these as
   high priority when they guard organization administration, billing-gated
   features, connector/tool approval, secret access, key rotation, data export,
   destructive operations, or workflow promotion.
5. Upgrade affected Clerk packages to the fixed release for the current major
   line. Regenerate lockfiles, workspace metadata, SBOMs, image metadata, and
   deployment artifacts controlled by this repository.
6. If any sensitive gate uses a combined `has()` or `auth.protect()` object,
   either:
   - rewrite it as sequential single-condition checks that deny when any check
     fails, or
   - preserve the API shape only after adding regression coverage that proves
     missing role, missing permission, missing plan/feature, and missing
     reverification each deny access on the fixed SDK.
7. For `@clerk/nextjs`, ensure `auth.protect()` authorization parameters are
   not silently bypassed when redirect or token options are present. Prefer
   separate authorization enforcement and redirect handling where the codebase
   pattern allows it.
8. Add regression tests with fake users/sessions/claims that prove denial for:
   - correct role but missing reverification;
   - correct reverification but missing permission;
   - correct billing plan or feature but missing role or permission;
   - redirect/token options present without satisfying authorization;
   - any project-specific admin, billing, connector, or agent-control gate.
9. Add a PR body section named `CVE-2026-42349 operator actions` that states:
   - Clerk packages and versions before and after the change;
   - which combined authorization predicates were found;
   - which sensitive actions they protected;
   - whether any temporary sequential-check mitigation was added;
   - which audit logs should be reviewed for sensitive actions during the
     vulnerable window;
   - whether any tenant, organization, billing, or entitlement state requires
     manual review.
10. Run the relevant validation: package-manager install check, unit tests,
    route/action authorization tests, integration tests, lint/typecheck, build,
    dependency scan, and any policy or E2E checks available in this repository.
11. Use PR title:
    `fix(sec): remediate CVE-2026-42349 in Clerk authorization`.

## Stop conditions

- The repository does not depend on Clerk packages and does not deploy a Clerk
  application.
- All resolved Clerk packages are already fixed and no generated deployment
  artifact remains vulnerable.
- The project uses only single-condition Clerk checks and tests prove no
  affected combined predicate object protects sensitive actions.
- A package upgrade is blocked by a framework or product migration outside
  this repository; document the owner, required fixed versions, and temporary
  sequential-check mitigation.
- Verifying exposure would require using production sessions, real customer
  identities, billing data, organization secrets, or live tokens.
- Validation fails for unrelated pre-existing reasons; document those failures
  instead of broadening scope.

Verification - what the reviewer looks for

  • No controlled package manifest, lockfile, image, SBOM, or deployment artifact resolves an affected Clerk SDK version.
  • Sensitive gates that combine role, permission, billing, feature, plan, or reverification checks either use fixed Clerk packages with regression tests or have been split into sequential fail-closed checks.
  • @clerk/nextjs auth.protect() calls do not drop authorization behavior when redirect or token options are present.
  • Tests cover negative authorization cases, not only happy-path admin access.
  • The PR names any audit-log review or manual tenant/org/billing review needed for actions performed during the vulnerable window.

Watch for

  • Updating package.json while lockfiles, workspaces, Docker layers, or SBOMs still resolve vulnerable Clerk packages.
  • Fixing @clerk/nextjs but leaving a vulnerable direct @clerk/shared or @clerk/clerk-js pin in the same workspace.
  • Wrapper helpers that hide combined has() calls behind names like requireAdmin, requirePremium, assertOrgPermission, or protectRoute.
  • Tests that only assert authorized users are allowed and never assert that partially qualified users are denied.
  • Agentic admin surfaces where billing plan, org role, connector approval, and reverification are combined into a single high-impact gate.

References