{"id":"CVE-2022-23540","aliases":["CVE-2022-23540","GHSA-qwph-4952-7xr6"],"related":[],"kind":"vulnerability","state":"published","title":"jsonwebtoken vulnerable to signature validation bypass due to insecure default algorithm in jwt.verify()","summary":"In versions `<=8.5.1` of `jsonwebtoken` library, lack of algorithm definition in the `jwt.verify()` function can lead to signature validation bypass due to defaulting to the `none` algorithm for signature verification. Users are affected if you do not specify algorithms in the `jwt.verify()` function. This issue has been fixed, please update to version 9.0.0 which removes the default support for the none algorithm in the `jwt.verify()` method. There will be no impact, if you update to version 9.0.0 and you don’t need to allow for the `none` algorithm. If you need 'none' algorithm, you have to explicitly specify that in `jwt.verify()` options.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In versions `<=8.5.1` of `jsonwebtoken` library, lack of algorithm definition in the `jwt.verify()` function can lead to signature validation bypass due to defaulting to the `none` algorithm for signature verification. Users are affected if you do not specify algorithms in the `jwt.verify()` function. This issue has been fixed, please update to version 9.0.0 which removes the default support for the none algorithm in the `jwt.verify()` method. There will be no impact, if you update to version 9.0.0 and you don’t need to allow for the `none` algorithm. If you need 'none' algorithm, you have to explicitly specify that in `jwt.verify()` options.","source":"cvelist"},{"lang":"en","text":"# Overview\n\nIn versions <=8.5.1 of jsonwebtoken library, lack of algorithm definition and a falsy secret or key in the `jwt.verify()` function can lead to signature validation bypass due to defaulting to the `none` algorithm for signature verification.\n\n# Am I affected?\nYou will be affected if all the following are true in the `jwt.verify()` function:\n- a token with no signature is received\n- no algorithms are specified \n- a falsy (e.g. null, false, undefined) secret or key is passed \n\n# How do I fix it?\n \nUpdate to version 9.0.0 which removes the default support for the none algorithm in the `jwt.verify()` method. \n\n# Will the fix impact my users?\n\nThere will be no impact, if you update to version 9.0.0 and you don’t need to allow for the `none` algorithm. If you need 'none' algorithm, you have to explicitly specify that in `jwt.verify()` options.","format":"markdown","source":"ghsa"},{"lang":"es","text":"En las versiones `&lt;=8.5.1` de la librería `jsonwebtoken`, la falta de definición del algoritmo en la función `jwt.verify()` puede provocar que se omita la validación de firmas debido a que se utiliza de manera predeterminada el algoritmo `none` para la verificación de firmas. Los usuarios se ven afectados si no especifica algoritmos en la función `jwt.verify()`. Este problema se ha solucionado; actualice a la versión 9.0.0, que elimina la compatibilidad predeterminada con el algoritmo none en el método `jwt.verify()`. No habrá ningún impacto si actualiza a la versión 9.0.0 y no necesita permitir el algoritmo \"none\". Si necesita el algoritmo 'none', debe especificarlo explícitamente en las opciones `jwt.verify()`.","source":"nvd"}],"published":"2022-12-22T03:32:59.000Z","modified":"2026-06-17T04:30:19.267Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L","score":6.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L","score":6.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L","score":6.4,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:L","score":7.6,"rating":"HIGH"}],"cwes":["CWE-287","CWE-327","CWE-347"],"affected":[{"ranges":[{"version":"<= 8.5.1","status":"affected"}],"vendor":"auth0","product":"node-jsonwebtoken","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"9.0.0"}],"ecosystem":"npm","package":"jsonwebtoken","purl":"pkg:npm/jsonwebtoken","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"8.5.1"}],"vendor":"auth0","product":"jsonwebtoken","cpe":"cpe:2.3:a:auth0:jsonwebtoken:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/auth0/node-jsonwebtoken/security/advisories/GHSA-qwph-4952-7xr6","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/auth0/node-jsonwebtoken/commit/e1fa9dcc12054a8681db4e6373da1b30cf7016e3","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://security.netapp.com/advisory/ntap-20240621-0007/","tags":["x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23540","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/auth0/node-jsonwebtoken","tags":["package"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20240621-0007","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-07-16T16:23:30.289Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-23540","url":"https://www.cve.org/CVERecord?id=CVE-2022-23540","licence":"CVE Terms of Use","modified":"2025-02-13T16:32:21.578Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qwph-4952-7xr6","url":"https://github.com/advisories/GHSA-qwph-4952-7xr6","licence":"CC-BY-4.0","modified":"2025-02-13T18:33:13.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-23540","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23540","licence":"Public domain","modified":"2026-06-17T04:30:19.267Z"}],"updatedAt":"2026-11-25T22:58:17.754Z","epss":{"score":0.00583,"percentile":0.49243,"date":"2026-12-01T12:00:22.000Z"}}