{"answers":{"affected":"2 open source packages ship an affected version, including jsonwebtoken. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-23539 in the wild and no public exploit code.","fix":"Upgrade jsonwebtoken to 9.0.0 or later.","what":"CVE-2022-23539 is a medium-severity vulnerability in auth0 node-jsonwebtoken, published on 22 Dec 2022. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-23539 and fix it if it is affected.\n\nWhat it is: CVE-2022-23539 is a medium-severity vulnerability in auth0 node-jsonwebtoken, published on 22 Dec 2022. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-23539 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- jsonwebtoken (npm): affected all versions; fixed in 9.0.0\n- jsonwebtoken (npm): affected all versions; fixed in 9.0.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-23539/ (Markdown: https://insights.sbomify.com/CVE-2022-23539/index.md)","id":"CVE-2022-23539","markdown":"https://insights.sbomify.com/CVE-2022-23539/index.md","name":"CVE-2022-23539","record":{"aliases":["GHSA-8cf7-32gw-wr33","ROOT-APP-NPM-CVE-2022-23539"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":true,"product_category":"Node.js JWT library","requires_auth":"low_privilege","summary":"Attackers can bypass JWT signature verification by using insecure key types with mismatched algorithms, requiring developers to upgrade the jsonwebtoken library.","user_interaction":"not_required","vuln_class":"weak_cryptography"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"jsonwebtoken","vendor":"auth0"}],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-327","name":"Use of a Broken or Risky Cryptographic Algorithm"}],"description":"Versions `\u003c=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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"jsonwebtoken unrestricted key type could lead to legacy keys usage","id":"CVE-2022-23539","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"weak_cryptography","year":"2022"},"n_packages":2,"n_references":3,"next":{"headline":"jsonwebtoken vulnerable to signature validation bypass due to insecure default algorithm in jwt.verify()","id":"CVE-2022-23540"},"packages":[{"ecosystem":"npm","fixed":["9.0.0"],"introduced":["0"],"last_affected":[],"package":"jsonwebtoken","purl":null,"source":"GHSA-8cf7-32gw-wr33"},{"ecosystem":"npm","fixed":["9.0.0"],"introduced":["0"],"last_affected":[],"package":"jsonwebtoken","purl":"pkg:npm/jsonwebtoken","source":"GHSA-8cf7-32gw-wr33"}],"prev":{"headline":"User credentials leaked to third-party service via HTTP redirect in scs-library-client","id":"CVE-2022-23538"},"products":["node-jsonwebtoken"],"published":"2022-12-22","related":[{"cvss_score":9.8,"headline":"Verification Bypass in jsonwebtoken","id":"CVE-2015-9235","kev_date_added":null,"published":"2018-05-29"},{"cvss_score":6.4,"headline":"jsonwebtoken vulnerable to signature validation bypass due to insecure default algorithm in jwt.verify()","id":"CVE-2022-23540","kev_date_added":null,"published":"2022-12-22"},{"cvss_score":5,"headline":"jsonwebtoken's insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC","id":"CVE-2022-23541","kev_date_added":null,"published":"2022-12-22"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-15","vendors":["auth0"]},"summary":"Attackers can bypass JWT signature verification by using insecure key types with mismatched algorithms, requiring developers to upgrade the jsonwebtoken library.","url":"https://insights.sbomify.com/CVE-2022-23539/"}