cbcvebase.
CVE-2022-23529
published 2022-12-22

CVE-2022-23529: jsonwebtoken has insecure input validation in jwt.verify function # Overview For versions `<=8.5.1` of `jsonwebtoken` library, if a malicious actor has the…

high
jsonwebtoken has insecure input validation in jwt.verify function

# Overview

For versions `<=8.5.1` of `jsonwebtoken` library, if a malicious actor has the ability to modify the key retrieval parameter (referring to the `secretOrPublicKey` argument from the [readme link](https://github.com/auth0/node-jsonwebtoken#jwtverifytoken-secretorpublickey-options-callback)) of the `jwt.verify()` function, they can gain remote code execution (RCE).

# Am I affected?

This security issue is a concern when the `jsonwebtoken` library is used in an insecure way. Users are affected only if they allow untrusted entities to modify the key retrieval parameter of the `jwt.verify()` on a host that you control. In this scenario, if all the prerequisites are met, the issue may be exploitable. The source of this risk in this scenario would be in the calling code, and not in the library itself.

# How do I fix it?

Users of jsonwebtoken 8.5.1 and earlier are encouraged to update to the latest version, 9.0.0, which presents safer code and important security checks that fixes this security flaw and others and prevents misuse of the package.

Affected

1 ranges
VendorProductVersion rangeFixed in
auth0jsonwebtoken>= 0 < 9.0.09.0.0
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.