CVE-2022-23539
jsonwebtoken unrestricted key type could lead to legacy keys usage
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
5.9
jsonwebtoken unrestricted key type could lead to legacy keys usage
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.
- Record
CVE-2022-23539- 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 - Weakness
- CWE-327
- Updated
- 2026-11-02
EUVDEUVD-2022-7563
5.9
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.
- Record
EUVD-2022-7563- 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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-8cf7-32gw-wr33
8.1
jsonwebtoken unrestricted key type could lead to legacy keys usage
Overview
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.
Am I affected?
You are affected if you are using an algorithm and a key type other than the combinations mentioned below
| Key type | algorithm | |----------|------------------------------------------| | ec | ES256, ES384, ES512 | | rsa | RS256, RS384, RS512, PS256, PS384, PS512 | | rsa-pss | PS256, PS384, PS512 |
And for Elliptic Curve algorithms:
| alg | Curve |
|-------|------------|
| ES256 | prime256v1 |
| ES384 | secp384r1 |
| ES512 | secp521r1 |
How do I fix it?
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.
Will the fix impact my users?
There will be no impact, if you update to version 9.0.0 and you already use a valid secure combination of key type and algorithm. Otherwise, use the allowInvalidAsymmetricKeyTypes option to true in the sign() and verify() functions to continue usage of invalid key type/algorithm combination in 9.0.0 for legacy compatibility.
- Record
GHSA-8cf7-32gw-wr33- 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 - Weakness
- CWE-327
- Updated
- 2026-11-02
NVD
5.9
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.
- Record
CVE-2022-23539- 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 - 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 - Weakness
- CWE-327
- Updated
- 2026-11-02
OSV
5.9
jsonwebtoken unrestricted key type could lead to legacy keys usage
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.
- Record
CVE-2022-23539- 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 - Weakness
- CWE-327
- Updated
- 2026-11-02
OSVGHSA-8cf7-32gw-wr33
8.1
jsonwebtoken unrestricted key type could lead to legacy keys usage
Overview
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.
Am I affected?
You are affected if you are using an algorithm and a key type other than the combinations mentioned below
| Key type | algorithm | |----------|------------------------------------------| | ec | ES256, ES384, ES512 | | rsa | RS256, RS384, RS512, PS256, PS384, PS512 | | rsa-pss | PS256, PS384, PS512 |
And for Elliptic Curve algorithms:
| alg | Curve |
|-------|------------|
| ES256 | prime256v1 |
| ES384 | secp384r1 |
| ES512 | secp521r1 |
How do I fix it?
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.
Will the fix impact my users?
There will be no impact, if you update to version 9.0.0 and you already use a valid secure combination of key type and algorithm. Otherwise, use the allowInvalidAsymmetricKeyTypes option to true in the sign() and verify() functions to continue usage of invalid key type/algorithm combination in 9.0.0 for legacy compatibility.
- Record
GHSA-8cf7-32gw-wr33- 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 - Weakness
- CWE-327
- Updated
- 2026-11-02
Show 6 moreShow less
OSVCLSA-2026-1774657372 No score
TuxCare security update for jsonwebtoken (3 CVEs)
TuxCare rebuilt jsonwebtoken to address 3 CVEs. Fixed in 8.5.1-tuxcare.1.
- Record
CLSA-2026-1774657372- Updated
- 2026-11-02
OSVCLSA-2026-1776818206 No score
TuxCare security update for jsonwebtoken (2 CVEs)
TuxCare rebuilt jsonwebtoken to address 2 CVEs. Fixed in 0.4.0-tuxcare.6.
- Record
CLSA-2026-1776818206- Updated
- 2026-11-02
OSVCLSA-2026-1776818208 No score
TuxCare security update for jsonwebtoken (3 CVEs)
TuxCare rebuilt jsonwebtoken to address 3 CVEs. Fixed in 0.4.1-tuxcare.3.
- Record
CLSA-2026-1776818208- Updated
- 2026-11-02
OSVCLSA-2026-1786361774 No score
TuxCare security update for jsonwebtoken (2 CVEs)
TuxCare rebuilt jsonwebtoken to address 2 CVEs. Fixed in 5.4.0-tuxcare.1.
- Record
CLSA-2026-1786361774- Updated
- 2026-11-02
OSVCLSA-2026-1787322010 No score
TuxCare security update for jsonwebtoken (3 CVEs)
TuxCare rebuilt jsonwebtoken to address 3 CVEs. Fixed in 0.3.0-tuxcare.3.
- Record
CLSA-2026-1787322010- Updated
- 2026-11-02
OSVROOT-APP-NPM-CVE-2022-23539 No score
CVE-2022-23539 in jsonwebtoken - Patched by Root
Root has patched CVE-2022-23539 in the jsonwebtoken package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2022-23539- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
jsonwebtokennpm |
through 8.5.1 | 9.0.0 |
jsonwebtokenTuxCare:npm From an advisory covering 3 CVEs |
8.5.1-tuxcare.0 up to 8.5.1-tuxcare.1, plus listed versions 8.5.1 |
8.5.1-tuxcare.1 |
jsonwebtokenTuxCare:npm From an advisory covering 2 CVEs |
0.4.0-tuxcare.0 up to 0.4.0-tuxcare.6, plus listed versions 0.4.00.4.0-tuxcare.10.4.0-tuxcare.20.4.0-tuxcare.30.4.0-tuxcare.40.4.0-tuxcare.5 |
0.4.0-tuxcare.6 |
jsonwebtokenTuxCare:npm From an advisory covering 3 CVEs |
0.4.1-tuxcare.0 up to 0.4.1-tuxcare.3, plus listed versions 0.4.10.4.1-tuxcare.10.4.1-tuxcare.2 |
0.4.1-tuxcare.3 |
jsonwebtokenTuxCare:npm From an advisory covering 2 CVEs |
5.4.0-tuxcare.0 up to 5.4.0-tuxcare.1, plus listed versions 5.4.0 |
5.4.0-tuxcare.1 |
jsonwebtokenTuxCare:npm From an advisory covering 3 CVEs |
0.3.0-tuxcare.0 up to 0.3.0-tuxcare.3, plus listed versions 0.3.00.3.0-tuxcare.10.3.0-tuxcare.2 |
0.3.0-tuxcare.3 |
jsonwebtokennpm |
before 9.0.0 | 9.0.0 |
jsonwebtokenRoot:npm |
before 8.2.0-aikido.2 | 8.2.0-aikido.28.5.1-aikido.40.1.0-aikido.58.5.1-aikido.58.2.0-aikido.3 |
@rootio/jsonwebtokenRoot:npm |
before 8.5.1-root.io.1 | 8.5.1-root.io.18.5.1-root.io.28.5.1-root.io.38.2.0-root.io.18.2.0-root.io.28.5.1-root.io.40.1.0-root.io.58.5.1-root.io.58.2.0-root.io.3 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-23539 is a medium vulnerability (CVSS 5.9) in Auth0 Jsonwebtoken, published December 22, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.52%, the 44th percentile. Fixed in jsonwebtoken 9.0.0.
References
github.com/auth0/node-jsonwebtoken/security/advisories/GHSA-8cf7-32gw-wr33
github.com/auth0/node-jsonwebtoken/commit/e1fa9dcc12054a8681db4e6373da1b30cf7016e3
security.netapp.com/advisory/ntap-20240621-0007
nvd.nist.gov/vuln/detail/CVE-2022-23539
github.com/advisories/GHSA-8cf7-32gw-wr33
github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23539.json
github.com/auth0/node-jsonwebtoken