{"answers":{"affected":"3 open source packages ship an affected version, including python-jwt. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-39227 in the wild and no public exploit code.","fix":"Upgrade python-jwt to 3.3.4 or later.","what":"CVE-2022-39227 is a critical authentication bypass vulnerability in davedoesdev python-jwt, published on 23 Sep 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-39227 and fix it if it is affected.\n\nWhat it is: CVE-2022-39227 is a critical authentication bypass vulnerability in davedoesdev python-jwt, published on 23 Sep 2022. 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-2022-39227 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- python-jwt (PyPI): affected all versions; fixed in 3.3.4\n- python-jwt (PyPI): affected all versions; fixed in 3.3.4\n- python-jwt (PyPI): affected from 3.0.0; fixed in 3.3.4\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-39227/ (Markdown: https://insights.sbomify.com/CVE-2022-39227/index.md)","id":"CVE-2022-39227","markdown":"https://insights.sbomify.com/CVE-2022-39227/index.md","name":"CVE-2022-39227","record":{"aliases":["AZL-11032","GHSA-5p8v-58qm-c7fp","PYSEC-2022-259"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["account_takeover","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Python JWT library","requires_auth":"none","summary":"Attackers can forge JWT contents to spoof identities, hijack sessions, or bypass authentication in applications using this library.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"python-jwt","vendor":"python-jwt_project"}],"cvss":{"score":9.1,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-290","name":"Authentication Bypass by Spoofing"}],"description":"python-jwt is a module for generating and verifying JSON Web Tokens. Versions prior to 3.3.4 are subject to Authentication Bypass by Spoofing, resulting in identity spoofing, session hijacking or authentication bypass. An attacker who obtains a JWT can arbitrarily forge its contents without knowing the secret key. Depending on the application, this may for example enable the attacker to spoof other user's identities, hijack their sessions, or bypass authentication. Users should upgrade to version 3.3.4. There are no known workarounds.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":"2023-06-07","github_poc":3,"max_poc_stars":22,"metasploit":0,"nuclei":0,"refs":[{"date":"2023-06-07T11:11:12Z","kind":"github_poc","ref":"https://github.com/user0x1337/CVE-2022-39227","stars":22,"title":"CVE-2022-39227 : Proof of Concept "},{"date":"2026-04-27T23:32:48Z","kind":"github_poc","ref":"https://github.com/melikesraoz/cve-2022-39227-jwt-auth-bypass-demo","stars":1,"title":null},{"date":"2024-03-28T12:55:13Z","kind":"github_poc","ref":"https://github.com/NoSpaceAvailable/CVE-2022-39227","stars":0,"title":"A working POC found while doing a HTB challenge. Original: https://github.com/user0x1337/CVE-2022-39227"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Python-jwt subject to Authentication Bypass by Spoofing","id":"CVE-2022-39227","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"auth_bypass","year":"2022"},"n_packages":3,"n_references":4,"next":{"headline":"Observable Response Discrepancy in vantage6","id":"CVE-2022-39228"},"packages":[{"ecosystem":"PyPI","fixed":["3.3.4"],"introduced":["0"],"last_affected":[],"package":"python-jwt","purl":null,"source":"GHSA-5p8v-58qm-c7fp"},{"ecosystem":"PyPI","fixed":["3.3.4"],"introduced":["0"],"last_affected":[],"package":"python-jwt","purl":"pkg:pypi/python-jwt","source":"GHSA-5p8v-58qm-c7fp"},{"ecosystem":"PyPI","fixed":["3.3.4"],"introduced":["3.0.0"],"last_affected":[],"package":"python-jwt","purl":"pkg:pypi/python-jwt","source":"PYSEC-2022-259"}],"prev":{"headline":"Discourse user profile location and website fields were not sufficiently length-limited","id":"CVE-2022-39226"},"products":["python-jwt"],"published":"2022-09-23","related":[],"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":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"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":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-03","vendors":["davedoesdev"]},"summary":"Attackers can forge JWT contents to spoof identities, hijack sessions, or bypass authentication in applications using this library.","url":"https://insights.sbomify.com/CVE-2022-39227/"}