{"id":"CVE-2022-23541","aliases":["CLSA-2026-1774657372","CLSA-2026-1776818208","CLSA-2026-1786361774","CLSA-2026-1787321999","CLSA-2026-1787322010","EUVD-2022-7650","GHSA-hjrf-2m68-5959","ROOT-APP-NPM-CVE-2022-23541"],"status":"published","title":"jsonwebtoken's insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC","description":"jsonwebtoken is an implementation of JSON Web Tokens. Versions `\u003c= 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.","severity":{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.0081,"percentile":0.5717,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1259","CWE-287"],"published":"2022-12-22T03:33:19Z","modified":"2026-10-28T02:30:39Z","fixes":[{"ecosystem":"npm","package":"jsonwebtoken","fixed_in":["9.0.0"],"sources":["ghsa","osv"]},{"ecosystem":"Root:npm","package":"jsonwebtoken","fixed_in":["8.2.0-aikido.2","8.5.1-aikido.4","8.5.1-aikido.5","8.2.0-aikido.3"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/jsonwebtoken","fixed_in":["8.5.1-root.io.2","8.5.1-root.io.3","8.2.0-root.io.1","8.2.0-root.io.2","8.5.1-root.io.4","8.5.1-root.io.5","8.2.0-root.io.3"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"jsonwebtoken","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"8.5.1"},{"fixed":"9.0.0"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"jsonwebtoken","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"8.5.1-tuxcare.0"},{"fixed":"8.5.1-tuxcare.1"}]}],"versions":["8.5.1"],"bundled":3},{"source":"osv","ecosystem":"TuxCare:npm","package":"jsonwebtoken","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.4.1-tuxcare.0"},{"fixed":"0.4.1-tuxcare.3"}]}],"versions":["0.4.1","0.4.1-tuxcare.1","0.4.1-tuxcare.2"],"bundled":3},{"source":"osv","ecosystem":"TuxCare:npm","package":"jsonwebtoken","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.4.0-tuxcare.0"},{"fixed":"5.4.0-tuxcare.1"}]}],"versions":["5.4.0"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"jsonwebtoken","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.4.0-tuxcare.0"},{"fixed":"0.4.0-tuxcare.7"}]}],"versions":["0.4.0","0.4.0-tuxcare.1","0.4.0-tuxcare.2","0.4.0-tuxcare.3","0.4.0-tuxcare.4","0.4.0-tuxcare.5","0.4.0-tuxcare.6"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"jsonwebtoken","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.3.0-tuxcare.0"},{"fixed":"0.3.0-tuxcare.3"}]}],"versions":["0.3.0","0.3.0-tuxcare.1","0.3.0-tuxcare.2"],"bundled":3},{"source":"osv","ecosystem":"npm","package":"jsonwebtoken","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"9.0.0"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"jsonwebtoken","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.0-aikido.2"},{"fixed":"8.5.1-aikido.4"},{"fixed":"8.5.1-aikido.5"},{"fixed":"8.2.0-aikido.3"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/jsonwebtoken","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.5.1-root.io.2"},{"fixed":"8.5.1-root.io.3"},{"fixed":"8.2.0-root.io.1"},{"fixed":"8.2.0-root.io.2"},{"fixed":"8.5.1-root.io.4"},{"fixed":"8.5.1-root.io.5"},{"fixed":"8.2.0-root.io.3"}]}]}],"products":[{"vendor":"auth0","product":"jsonwebtoken"},{"vendor":"auth0","product":"node-jsonwebtoken"}],"references":[{"url":"https://github.com/auth0/node-jsonwebtoken/security/advisories/GHSA-hjrf-2m68-5959","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/auth0/node-jsonwebtoken/commit/e1fa9dcc12054a8681db4e6373da1b30cf7016e3","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://github.com/auth0/node-jsonwebtoken/releases/tag/v9.0.0","tags":["x_refsource_MISC","x_transferred","Release Notes","web"]},{"url":"https://security.netapp.com/advisory/ntap-20240621-0007/","tags":["x_transferred","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23541","tags":["advisory"]},{"url":"https://security.netapp.com/advisory/ntap-20240621-0007","tags":["web"]},{"url":"https://github.com/advisories/GHSA-hjrf-2m68-5959"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23541.json","tags":["advisory"]},{"url":"https://github.com/auth0/node-jsonwebtoken","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-23541","title":"jsonwebtoken's insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC","description":"jsonwebtoken is an implementation of JSON Web Tokens. Versions `\u003c= 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.","status":"published","published":"2022-12-22T17:52:22.173Z","modified":"2025-02-13T16:32:22.327Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium","assessor":"cna"}],"cwes":["CWE-287","CWE-1259"],"updated_at":"2026-11-02T14:34:29.478363Z"}],"euvd":[{"id":"EUVD-2022-7650","description":"jsonwebtoken is an implementation of JSON Web Tokens. Versions `\u003c= 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.","status":"published","published":"2022-12-22T17:52:22Z","modified":"2025-02-13T16:32:22Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"updated_at":"2026-11-03T00:03:52.752782Z"}],"ghsa":[{"id":"GHSA-hjrf-2m68-5959","title":"jsonwebtoken's insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC","description":"# Overview\n\nVersions `\u003c=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](https://github.com/auth0/node-jsonwebtoken#jwtverifytoken-secretorpublickey-options-callback)) will result in incorrect verification of tokens. There is a possibility of using a different algorithm and key combination in verification  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. \n\n# Am I affected?\n\nYou will be affected if your application is supporting usage of both symmetric key and asymmetric key in jwt.verify() implementation with the same key retrieval function. \n\n# How do I fix it?\n \nUpdate to version 9.0.0.\n\n# Will the fix impact my users?\n\nThere is no impact for end users","status":"published","published":"2022-12-22T03:33:19Z","modified":"2024-06-24T21:24:07Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-287","CWE-1259"],"updated_at":"2026-11-02T14:37:55.455438Z"}],"nvd":[{"id":"CVE-2022-23541","description":"jsonwebtoken is an implementation of JSON Web Tokens. Versions `\u003c= 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.","status":"published","published":"2022-12-22T18:15:09.39Z","modified":"2026-06-17T04:30:19.393Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium","assessor":"secondary"},{"version":"3.1","score":6.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium","assessor":"primary"}],"cwes":["CWE-287","CWE-1259"],"updated_at":"2026-11-02T14:07:34.388163Z"}],"osv":[{"id":"CVE-2022-23541","title":"jsonwebtoken's insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC","description":"jsonwebtoken is an implementation of JSON Web Tokens. Versions `\u003c= 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.","status":"published","published":"2022-12-22T17:52:22.173Z","modified":"2026-10-28T02:30:39.053722749Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-1259","CWE-287"],"updated_at":"2026-11-02T15:44:24.061177Z"},{"id":"GHSA-hjrf-2m68-5959","title":"jsonwebtoken's insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC","description":"# Overview\n\nVersions `\u003c=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](https://github.com/auth0/node-jsonwebtoken#jwtverifytoken-secretorpublickey-options-callback)) will result in incorrect verification of tokens. There is a possibility of using a different algorithm and key combination in verification  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. \n\n# Am I affected?\n\nYou will be affected if your application is supporting usage of both symmetric key and asymmetric key in jwt.verify() implementation with the same key retrieval function. \n\n# How do I fix it?\n \nUpdate to version 9.0.0.\n\n# Will the fix impact my users?\n\nThere is no impact for end users","status":"published","published":"2022-12-22T03:33:19Z","modified":"2024-06-24T21:24:06Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-1259","CWE-287"],"updated_at":"2026-11-02T15:46:49.28217Z"},{"id":"CLSA-2026-1774657372","title":"TuxCare security update for jsonwebtoken (3 CVEs)","description":"TuxCare rebuilt jsonwebtoken to address 3 CVEs. Fixed in 8.5.1-tuxcare.1.","status":"published","published":"2026-08-04T14:52:15Z","modified":"2026-10-15T09:47:48.482531338Z","updated_at":"2026-11-02T15:43:43.621843Z"},{"id":"CLSA-2026-1776818208","title":"TuxCare security update for jsonwebtoken (3 CVEs)","description":"TuxCare rebuilt jsonwebtoken to address 3 CVEs. Fixed in 0.4.1-tuxcare.3.","status":"published","published":"2026-08-04T14:52:27Z","modified":"2026-10-15T09:45:45.676261562Z","updated_at":"2026-11-02T15:43:44.384419Z"},{"id":"CLSA-2026-1786361774","title":"TuxCare security update for jsonwebtoken (2 CVEs)","description":"TuxCare rebuilt jsonwebtoken to address 2 CVEs. Fixed in 5.4.0-tuxcare.1.","status":"published","published":"2026-08-10T11:36:14Z","modified":"2026-10-15T09:45:58.184593846Z","updated_at":"2026-11-02T15:43:46.850893Z"},{"id":"CLSA-2026-1787321999","title":"TuxCare security update for jsonwebtoken (2 CVEs)","description":"TuxCare rebuilt jsonwebtoken to address 2 CVEs. Fixed in 0.4.0-tuxcare.7.","status":"published","published":"2026-08-21T14:19:59Z","modified":"2026-10-15T09:46:45.667936006Z","updated_at":"2026-11-02T15:43:47.20725Z"},{"id":"CLSA-2026-1787322010","title":"TuxCare security update for jsonwebtoken (3 CVEs)","description":"TuxCare rebuilt jsonwebtoken to address 3 CVEs. Fixed in 0.3.0-tuxcare.3.","status":"published","published":"2026-08-21T14:20:10Z","modified":"2026-10-15T09:46:45.665795689Z","updated_at":"2026-11-02T15:43:47.20725Z"},{"id":"ROOT-APP-NPM-CVE-2022-23541","title":"CVE-2022-23541 in jsonwebtoken - Patched by Root","description":"Root has patched CVE-2022-23541 in the jsonwebtoken package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-08-11T06:46:09Z","modified":"2026-08-11T09:00:06.043656007Z","updated_at":"2026-11-02T15:53:27.362922Z"}]}}
