{"id":"CVE-2022-39227","aliases":["AZL-11032","EUVD-2022-0219","GHSA-5p8v-58qm-c7fp","PYSEC-2022-259"],"status":"published","title":"Python-jwt subject to 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.","severity":{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.05342,"percentile":0.92692,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-290"],"published":"2022-09-01T18:51:51Z","modified":"2026-10-28T02:31:09Z","exploits":[{"source":"pocgithub","id":"NoSpaceAvailable/CVE-2022-39227","title":"NoSpaceAvailable/CVE-2022-39227","date":"2024-03-28","url":"https://github.com/NoSpaceAvailable/CVE-2022-39227"},{"source":"pocgithub","id":"melikesraoz/cve-2022-39227-jwt-auth-bypass-demo","title":"melikesraoz/cve-2022-39227-jwt-auth-bypass-demo","date":"2026-04-27","url":"https://github.com/melikesraoz/cve-2022-39227-jwt-auth-bypass-demo"},{"source":"pocgithub","id":"user0x1337/CVE-2022-39227","title":"user0x1337/CVE-2022-39227","date":"2023-06-07","url":"https://github.com/user0x1337/CVE-2022-39227"}],"fixes":[{"ecosystem":"PyPI","package":"python-jwt","fixed_in":["3.3.4"],"sources":["ghsa","osv"]},{"ecosystem":"Azure Linux:2","package":"python-jwt","fixed_in":["2.4.0-2"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"python-jwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.3.4"}]}]},{"source":"osv","ecosystem":"Azure Linux:2","package":"python-jwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.0-2"}]}]},{"source":"osv","ecosystem":"PyPI","package":"python-jwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.3.4"}]}],"versions":["0.1.0","0.2.0","0.2.1","0.3.0","0.3.1","0.3.2","0.3.3","0.3.4","0.3.5","0.3.6","0.3.7","0.3.8","1.0.0","1.0.1","1.0.2","1.0.3","1.1.0","1.1.1","1.1.2","1.1.3","1.1.5","1.1.6","1.1.7","1.2.0","1.2.1","2.0.0","2.0.1","2.0.2","3.0.0","3.1.0","3.2.0","3.2.1","3.2.2","3.2.3","3.2.4","3.2.5","3.2.6","3.3.0","3.3.1","3.3.2","3.3.3"]},{"source":"osv","ecosystem":"PyPI","package":"python-jwt","ranges":[{"type":"GIT","events":[{"introduced":"f6d1451012c6a04c2fb1940f0bbd93bb6cf2b025"},{"fixed":"88ad9e67c53aa5f7c43ec4aa52ed34b7930068c9"}]},{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.3.4"}]}],"versions":["3.3.0","3.1.0","3.2.0","3.2.1","3.2.2","3.2.3","3.2.4","3.2.5","3.2.6","3.3.0","3.3.1","3.3.2","3.3.3","3.0.0"]}],"products":[{"vendor":"davedoesdev","product":"python-jwt"},{"vendor":"python-jwt_project","product":"python-jwt"}],"references":[{"url":"https://github.com/davedoesdev/python-jwt/security/advisories/GHSA-5p8v-58qm-c7fp","tags":["x_transferred","Patch","Third Party Advisory","advisory","web"]},{"url":"https://github.com/davedoesdev/python-jwt/commit/88ad9e67c53aa5f7c43ec4aa52ed34b7930068c9","tags":["x_transferred","Patch","fix","web"]},{"url":"https://github.com/pypa/advisory-database/blob/main/vulns/python-jwt/PYSEC-2022-259.yaml","tags":["x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://www.vicarius.io/vsociety/posts/authentication-bypass-in-python-jwt","tags":["x_transferred","web"]},{"url":"https://github.com/davedoesdev/python-jwt/commit/6c5075469847b9e8b6e5336077d989d77a4d2bf1","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39227","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-5p8v-58qm-c7fp"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/39xxx/CVE-2022-39227.json","tags":["advisory"]},{"url":"https://github.com/davedoesdev/python-jwt","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-39227","title":"Python-jwt subject to 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.","status":"published","published":"2022-09-23T06:55:09Z","modified":"2024-08-03T12:00:43.537Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical","assessor":"cna"}],"cwes":["CWE-290"],"updated_at":"2026-11-02T14:34:39.559326Z"}],"euvd":[{"id":"EUVD-2022-0219","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.","status":"published","published":"2022-09-23T06:55:09Z","modified":"2024-08-03T12:00:43Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical"}],"updated_at":"2026-11-03T03:25:21.461008Z"}],"ghsa":[{"id":"GHSA-5p8v-58qm-c7fp","title":"python-jwt vulnerable to token forgery with new claims","description":"### Impact\nAn 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.\n\n### Patches\nUsers should upgrade to version 3.3.4\nFixed by: https://github.com/davedoesdev/python-jwt/commit/88ad9e67c53aa5f7c43ec4aa52ed34b7930068c9\n\n### Workarounds\nNone\n\n### References\nFound by [Tom Tervoort](Tom.Tervoort@secura.com)\nhttps://github.com/pypa/advisory-database/blob/main/vulns/python-jwt/PYSEC-2022-259.yaml\n\n### More information\n\nThe vulnerability allows an attacker, who possesses a single valid JWT, to create a new token with forged claims that the verify_jwt function will accept as valid.\n\nThe issue is caused by an inconsistency between the JWT parsers used by python-jwt and its dependency jwcrypto. By mixing compact and JSON representations, an attacker can trick jwcrypto of parsing different claims than those over which a signature is validated by jwcrypto.\n\nTesting the fix has been added as an [automated unit test](https://github.com/davedoesdev/python-jwt/blob/master/test/vulnerability_vows.py) to python-jwt.\n\nIf you have any questions or comments about this advisory, please open an issue in [python-jwt](https://github.com/davedoesdev/python-jwt)\n","status":"published","published":"2022-09-21T21:33:22Z","modified":"2024-08-09T05:01:43Z","cvss":[{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","level":"critical"},{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical"}],"cwes":["CWE-290"],"updated_at":"2026-11-02T14:37:59.336921Z"}],"nvd":[{"id":"CVE-2022-39227","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.","status":"published","published":"2022-09-23T07:15:09.3Z","modified":"2026-06-17T04:57:57.283Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical","assessor":"secondary"},{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical","assessor":"primary"}],"cwes":["CWE-290"],"updated_at":"2026-11-02T14:07:28.501364Z"}],"osv":[{"id":"AZL-11032","title":"CVE-2022-39227 affecting package python-jwt for versions less than 2.4.0-2","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.","status":"published","published":"2022-09-23T07:15:09Z","modified":"2026-04-21T04:21:45.841393Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical"}],"updated_at":"2026-11-02T15:28:02.044071Z"},{"id":"CVE-2022-39227","title":"Python-jwt subject to 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.","status":"published","published":"2022-09-23T06:55:09Z","modified":"2026-10-28T02:31:09.485120155Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical"}],"cwes":["CWE-290"],"updated_at":"2026-11-02T15:44:26.53798Z"},{"id":"GHSA-5p8v-58qm-c7fp","title":"python-jwt vulnerable to token forgery with new claims","description":"### Impact\nAn 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.\n\n### Patches\nUsers should upgrade to version 3.3.4\nFixed by: https://github.com/davedoesdev/python-jwt/commit/88ad9e67c53aa5f7c43ec4aa52ed34b7930068c9\n\n### Workarounds\nNone\n\n### References\nFound by [Tom Tervoort](Tom.Tervoort@secura.com)\nhttps://github.com/pypa/advisory-database/blob/main/vulns/python-jwt/PYSEC-2022-259.yaml\n\n### More information\n\nThe vulnerability allows an attacker, who possesses a single valid JWT, to create a new token with forged claims that the verify_jwt function will accept as valid.\n\nThe issue is caused by an inconsistency between the JWT parsers used by python-jwt and its dependency jwcrypto. By mixing compact and JSON representations, an attacker can trick jwcrypto of parsing different claims than those over which a signature is validated by jwcrypto.\n\nTesting the fix has been added as an [automated unit test](https://github.com/davedoesdev/python-jwt/blob/master/test/vulnerability_vows.py) to python-jwt.\n\nIf you have any questions or comments about this advisory, please open an issue in [python-jwt](https://github.com/davedoesdev/python-jwt)\n","status":"published","published":"2022-09-21T21:33:22Z","modified":"2024-07-10T21:46:12.326522Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical"},{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","level":"critical"}],"cwes":["CWE-290"],"updated_at":"2026-11-02T15:46:38.553953Z"},{"id":"PYSEC-2022-259","description":"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.","status":"published","published":"2022-09-01T18:51:51Z","modified":"2023-11-08T04:10:15.71393Z","updated_at":"2026-11-02T15:52:53.449407Z"}]}}
