{"answers":{"affected":"2 open source packages ship an affected version, including fast-jwt. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-48223 in the wild and no public exploit code.","fix":"Upgrade fast-jwt to 3.3.2 or later.","what":"CVE-2023-48223 is a medium-severity vulnerability in nearform fast-jwt, published on 20 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-48223 and fix it if it is affected.\n\nWhat it is: CVE-2023-48223 is a medium-severity vulnerability in nearform fast-jwt, published on 20 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-48223 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- fast-jwt (npm): affected all versions; fixed in 3.3.2\n- fast-jwt (npm): affected all versions; fixed in 3.3.2\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-2023-48223/ (Markdown: https://insights.sbomify.com/CVE-2023-48223/index.md)","id":"CVE-2023-48223","markdown":"https://insights.sbomify.com/CVE-2023-48223/index.md","name":"CVE-2023-48223","record":{"aliases":["GHSA-c2ff-88x2-x9pg"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":true,"product_category":"JavaScript JWT library","requires_auth":"none","summary":"Attackers can bypass JWT signature verification by exploiting algorithm confusion in fast-jwt when specific public key formats are used.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"fast-jwt","vendor":"nearform"}],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"}],"description":"fast-jwt provides fast JSON Web Token (JWT) implementation. Prior to version 3.3.2, the fast-jwt library does not properly prevent JWT algorithm confusion for all public key types. The 'publicKeyPemMatcher' in 'fast-jwt/src/crypto.js' does not properly match all common PEM formats for public keys. To exploit this vulnerability, an attacker needs to craft a malicious JWT token containing the HS256 algorithm, signed with the public RSA key of the victim application. This attack will only work if the victim application utilizes a public key containing the `BEGIN RSA PUBLIC KEY` header. Applications using the RS256 algorithm, a public key with a `BEGIN RSA PUBLIC KEY` header, and calling the verify function without explicitly providing an algorithm, are vulnerable to this algorithm confusion attack which allows attackers to sign arbitrary payloads which will be accepted by the verifier. Version 3.3.2 contains a patch for this issue. As a workaround, change line 29 of `blob/master/src/crypto.js` to include a regular expression.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":"2026-03-03","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-03-03T06:37:43Z","kind":"github_poc","ref":"https://github.com/lucastran05/CVE-2023-48223","stars":0,"title":null}],"tier":"poc_unverified"},"has_fix":true,"headline":"fast-jwt JWT Algorithm Confusion","id":"CVE-2023-48223","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"security_feature_bypass","year":"2023"},"n_packages":2,"n_references":3,"next":{"headline":"Cryptographically Weak Generation of One-Time Codes for Identity Verification in ethyca-fides","id":"CVE-2023-48224"},"packages":[{"ecosystem":"npm","fixed":["3.3.2"],"introduced":["0"],"last_affected":[],"package":"fast-jwt","purl":null,"source":"GHSA-c2ff-88x2-x9pg"},{"ecosystem":"npm","fixed":["3.3.2"],"introduced":["0"],"last_affected":[],"package":"fast-jwt","purl":"pkg:npm/fast-jwt","source":"GHSA-c2ff-88x2-x9pg"}],"prev":{"headline":"Authenticated users can view or delete jobs they do not have authorization for in Rundeck","id":"CVE-2023-48222"},"products":["fast-jwt"],"published":"2023-11-20","related":[{"cvss_score":9.1,"headline":"fast-jwt has an incomplete fix for CVE-2023-48223: JWT Algorithm Confusion via Whitespace-Prefixed RSA Public Key","id":"CVE-2026-34950","kev_date_added":null,"published":"2026-04-06"},{"cvss_score":9.1,"headline":"fast-jwt: Cache Confusion via cacheKeyBuilder Collisions Can Return Claims From a Different Token (Identity/Authorization Mixup)","id":"CVE-2026-35039","kev_date_added":null,"published":"2026-04-06"},{"cvss_score":7.5,"headline":"fast-jwt accepts unknown `crit` header extensions (RFC 7515 §4.1.11 MUST violation)","id":"CVE-2026-35042","kev_date_added":null,"published":"2026-04-06"},{"cvss_score":5.3,"headline":"fast-jwt: Stateful RegExp (/g or /y) causes non-deterministic allowed-claim validation (logical DoS)","id":"CVE-2026-35040","kev_date_added":null,"published":"2026-04-09"},{"cvss_score":4.2,"headline":"ReDoS in fast-jwt when using RegExp in allowed* leading to CPU exhaustion during token verification","id":"CVE-2026-35041","kev_date_added":null,"published":"2026-04-09"}],"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)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-02","vendors":["nearform"]},"summary":"Attackers can bypass JWT signature verification by exploiting algorithm confusion in fast-jwt when specific public key formats are used.","url":"https://insights.sbomify.com/CVE-2023-48223/"}