# CVE-2022-23539: jsonwebtoken unrestricted key type could lead to legacy keys usage

- Severity: Medium 5.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.53%, higher than 46% of CVEs (2026-12-01)
- Published: 2022-12-22T03:32:22.000Z
- Modified: 2026-06-17T04:30:19.143Z
- Also known as: GHSA-8cf7-32gw-wr33
- Weaknesses: CWE-327
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Versions `<=8.5.1` of `jsonwebtoken` library could be misconfigured so that legacy, insecure key types are used for signature verification. For example, DSA keys could be used with the RS256 algorithm. You are affected if you are using an algorithm and a key type other than a combination listed in the GitHub Security Advisory as unaffected. This issue has been fixed, please update to version 9.0.0. This version validates for asymmetric key type and algorithm combinations. Please refer to the above mentioned algorithm / key type combinations for the valid secure configuration. After updating to version 9.0.0, if you still intend to continue with signing or verifying tokens using invalid key type/algorithm value combinations, you’ll need to set the `allowInvalidAsymmetricKeyTypes` option  to `true` in the `sign()` and/or `verify()` functions.

(As written by CVE List.)

## Affected

- auth0 node-jsonwebtoken: <= 8.5.1
- jsonwebtoken (npm): before 9.0.0
- auth0 jsonwebtoken: up to 8.5.1

## Every score

- GitHub_M: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N`
- GitHub: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`
- NVD: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`

## References

- <https://github.com/auth0/node-jsonwebtoken/security/advisories/GHSA-8cf7-32gw-wr33> (third-party-advisory, web)
- <https://github.com/auth0/node-jsonwebtoken/commit/e1fa9dcc12054a8681db4e6373da1b30cf7016e3> (patch, third-party-advisory, web)
- <https://security.netapp.com/advisory/ntap-20240621-0007/>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-23539> (advisory)
- <https://github.com/auth0/node-jsonwebtoken> (package)
- <https://security.netapp.com/advisory/ntap-20240621-0007> (web)

## Sources

- CVE List: [CVE-2022-23539](https://www.cve.org/CVERecord?id=CVE-2022-23539), CVE Terms of Use, modified 2025-04-15
- GitHub Advisory Database: [GHSA-8cf7-32gw-wr33](https://github.com/advisories/GHSA-8cf7-32gw-wr33), CC-BY-4.0, modified 2024-06-24
- NVD: [CVE-2022-23539](https://nvd.nist.gov/vuln/detail/CVE-2022-23539), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-23539 · Whole record: https://cve.day/CVE-2022-23539.json · Rebuilt by cve.day 2026-11-25T22:58:17.829Z
