CVE-2022-23541: auth0 jsonwebtoken Improper Authentication
Vulnerability summary
CVE-2022-23541 is a medium (CVSS 6.3) Improper Authentication vulnerability in auth0 jsonwebtoken. EPSS estimates a 0.77% chance of exploitation in the next 30 days, higher than 54.9% of scored vulnerabilities.
Timeline
- 22-12-2022PublishedVulnerability first disclosed.
- 13-02-2025Last modifiedVulnerability information updated.
Description
jsonwebtoken is an implementation of JSON Web Tokens. Versions `<= 8.5.1` of `jsonwebtoken` library can be misconfigured so that passing a poorly implemented key retrieval function referring to the `secretOrPublicKey` argument from the readme link will result in incorrect verification of tokens. There is a possibility of using a different algorithm and key combination in verification, other than the one that was used to sign the tokens. Specifically, tokens signed with an asymmetric public key could be verified with a symmetric HS256 algorithm. This can lead to successful validation of forged tokens. If your application is supporting usage of both symmetric key and asymmetric key in jwt.verify() implementation with the same key retrieval function. This issue has been patched, please update to version 9.0.0.
CVSS metrics
3 scores · 3 sources · 1 version- CVE.orgCNA5.0MediumCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:LDiffers
- OSV · NpmEcosystem advisory · calculated5.0MediumCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:LDiffers
EPSS trend
Probability
0.77%
Chance of exploitation in the next 30 days
Percentile
55%
Versus all other CVEs
30-day change
+0.02 pp
From 0.75% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-287Improper AuthenticationWhen an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.
- CWE-1259Improper Restriction of Security Token AssignmentThe System-On-A-Chip (SoC) implements a Security Token mechanism to differentiate what actions are allowed or disallowed when a transaction originates from an entity. However, the Security Tokens are improperly protected.
Affected systems
Auth02 products
- jsonwebtoken≤ 8.5.1
- node-jsonwebtoken≤ 8.5.1
Npm1 product
- jsonwebtoken< 9.0.0
2 vendors · 3 products
References
7 links- github.com/auth0/node-jsonwebtoken/security/advisories/GHSA-hjrf-2m68-5959X Refsource CONFIRMWEBThird Party Advisory
- github.com/auth0/node-jsonwebtoken/commit/e1fa9dcc12054a8681db4e6373da1b30cf7016e3X Refsource MISCWEBPatch