jose is vulnerable to Improper Authentication
25
Low Risk
The JWT Claims Set validation used by jwtVerify and jwtDecrypt forces the issuer, subject, audience, and maxTokenAge claims to be present when the matching option is defined, but gates the actual value comparison on option truthiness. When a consuming application supplies a falsy validation option such as an empty string issuer, subject, or audience, or a maxTokenAge of 0, the claim is required to exist but its value is never compared, so any iss, sub, aud, or issuance age is accepted. Tokens that should fail the configured claim checks therefore pass validation. The fix compares the claim values whenever the option is defined rather than only when it is truthy.
You are affected if you are using a version that falls within the vulnerable range and your application passes a falsy issuer, subject, or audience value or a maxTokenAge of 0 to the JWT verification options (for example an unset or empty configuration value threaded straight into the options). The token's signature is still verified, so exploitation requires a validly signed token whose claim values differ from what the falsy option was intended to enforce.
jose is vulnerable to Improper Authentication in versions 4.14.0 - 6.2.4.
Upgrade the jose 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