@clerk/backend is vulnerable to Authentication Bypass
50
Medium Risk
authenticateRequestWithTokenInCookie lacks the isMachineJwt() guard that the header path already has, so an M2M or OAuth JWT placed in the __session cookie can pass session verification and produce a signed-in state with a machine identity as userId. That lets requests bypass if (userId)-style authorization checks. The fix rejects those machine tokens on the cookie path and returns a signed-out state, aligning cookie handling with the header-path guard.
You are affected if you are using a version that falls within the vulnerable range and your application authenticates requests from the __session cookie while also issuing or accepting M2M or OAuth JWTs for the same Clerk instance.
@clerk/backend is vulnerable to Authentication Bypass in versions 2.33.0 - 3.11.6.
Upgrade the @clerk/backend library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant