{"api_version":"1","generated_at":"2026-04-23T06:20:50+00:00","cve":"CVE-2022-23541","urls":{"html":"https://cve.report/CVE-2022-23541","api":"https://cve.report/api/cve/CVE-2022-23541.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-23541","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-23541"},"summary":{"title":"CVE-2022-23541","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.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2022-12-22 18:15:00","updated_at":"2023-11-07 03:44:00"},"problem_types":["NVD-CWE-Other"],"metrics":[],"references":[{"url":"https://github.com/auth0/node-jsonwebtoken/commit/e1fa9dcc12054a8681db4e6373da1b30cf7016e3","name":"https://github.com/auth0/node-jsonwebtoken/commit/e1fa9dcc12054a8681db4e6373da1b30cf7016e3","refsource":"MISC","tags":[],"title":"Merge pull request from GHSA-8cf7-32gw-wr33 · auth0/node-jsonwebtoken@e1fa9dc · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/auth0/node-jsonwebtoken/releases/tag/v9.0.0","name":"https://github.com/auth0/node-jsonwebtoken/releases/tag/v9.0.0","refsource":"MISC","tags":[],"title":"Release v9.0.0: Merge pull request from GHSA-8cf7-32gw-wr33 · auth0/node-jsonwebtoken · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/auth0/node-jsonwebtoken/security/advisories/GHSA-hjrf-2m68-5959","name":"https://github.com/auth0/node-jsonwebtoken/security/advisories/GHSA-hjrf-2m68-5959","refsource":"MISC","tags":[],"title":"Insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC · Advisory · auth0/node-jsonwebtoken · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-23541","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23541","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"23541","vulnerable":"1","versionEndIncluding":"8.5.1","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"auth0","cpe5":"jsonwebtoken","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"node.js","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"data_version":"4.0","data_type":"CVE","data_format":"MITRE","CVE_data_meta":{"ID":"CVE-2022-23541","ASSIGNER":"security-advisories@github.com","STATE":"PUBLIC"},"description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-287: Improper Authentication","cweId":"CWE-287"}]},{"description":[{"lang":"eng","value":"CWE-1259: Improper Restriction of Security Token Assignment","cweId":"CWE-1259"}]}]},"affects":{"vendor":{"vendor_data":[{"vendor_name":"auth0","product":{"product_data":[{"product_name":"node-jsonwebtoken","version":{"version_data":[{"version_value":"<= 8.5.1","version_affected":"="}]}}]}}]}},"references":{"reference_data":[{"url":"https://github.com/auth0/node-jsonwebtoken/commit/e1fa9dcc12054a8681db4e6373da1b30cf7016e3","refsource":"MISC","name":"https://github.com/auth0/node-jsonwebtoken/commit/e1fa9dcc12054a8681db4e6373da1b30cf7016e3"},{"url":"https://github.com/auth0/node-jsonwebtoken/security/advisories/GHSA-hjrf-2m68-5959","refsource":"MISC","name":"https://github.com/auth0/node-jsonwebtoken/security/advisories/GHSA-hjrf-2m68-5959"},{"url":"https://github.com/auth0/node-jsonwebtoken/releases/tag/v9.0.0","refsource":"MISC","name":"https://github.com/auth0/node-jsonwebtoken/releases/tag/v9.0.0"}]},"source":{"advisory":"GHSA-hjrf-2m68-5959","discovery":"UNKNOWN"},"impact":{"cvss":[{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":5,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"LOW","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L","version":"3.1"}]}},"nvd":{"publishedDate":"2022-12-22 18:15:00","lastModifiedDate":"2023-11-07 03:44:00","problem_types":["NVD-CWE-Other"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"LOW","integrityImpact":"LOW","availabilityImpact":"LOW","baseScore":6.3,"baseSeverity":"MEDIUM"},"exploitabilityScore":2.8,"impactScore":3.4}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:auth0:jsonwebtoken:*:*:*:*:*:node.js:*:*","versionEndIncluding":"8.5.1","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2022","CveId":"23541","Ordinal":"226319","Title":"CVE-2022-23541","CVE":"CVE-2022-23541","Year":"2022"},"notes":[{"CveYear":"2022","CveId":"23541","Ordinal":"1","NoteData":"** RESERVED ** This candidate has been reserved by an organization or individual that will use it when announcing a new security problem. When the candidate has been publicized, the details for this candidate will be provided.","Type":"Description","Title":null}]}}}