# CVE-2022-29217: Key confusion through non-blocklisted public key formats in PyJWT

- Severity: High 7.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.35%, higher than 72% of CVEs (2026-12-01)
- Published: 2022-05-24T14:10:10.000Z
- Modified: 2026-06-17T04:39:50.960Z
- Also known as: GHSA-ffqj-6fqr-9h24, PYSEC-2022-202
- Weaknesses: CWE-327
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

PyJWT is a Python implementation of RFC 7519. PyJWT supports multiple different JWT signing algorithms. With JWT, an attacker submitting the JWT token can choose the used signing algorithm. The PyJWT library requires that the application chooses what algorithms are supported. The application can specify `jwt.algorithms.get_default_algorithms()` to get support for all algorithms, or specify a single algorithm. The issue is not that big as `algorithms=jwt.algorithms.get_default_algorithms()` has to be used. Users should upgrade to v2.4.0 to receive a patch for this issue. As a workaround, always be explicit with the algorithms that are accepted and expected when decoding.

(As written by CVE List.)

## Affected

- jpadilla pyjwt: >= 1.5.0, < 2.4.0
- pyjwt (PyPI): from 1.5.0 before 2.4.0; before 9c528670c455b8d948aff95ed50e22940d1ad3fc
- pyjwt_project pyjwt: from 1.5.0 before 2.4.0
- fedoraproject fedora: 35; 36

## Every score

- GitHub_M: CVSS:3.1 7.4 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 7.4 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/jpadilla/pyjwt/security/advisories/GHSA-ffqj-6fqr-9h24> (advisory, issue-tracking, third-party-advisory, web)
- <https://github.com/jpadilla/pyjwt/commit/9c528670c455b8d948aff95ed50e22940d1ad3fc> (fix, patch, third-party-advisory, web)
- <https://github.com/jpadilla/pyjwt/releases/tag/2.4.0> (release-notes, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6HIYEYZRQEP6QTHT3EHH3RGFYJIHIMAO/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5PK7IQCBVNLYJEFTPHBBPFP72H4WUFNX/> (vendor-advisory)
- <https://www.vicarius.io/vsociety/posts/risky-algorithms-algorithm-confusion-in-pyjwt-cve-2022-29217>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-29217> (advisory)
- <https://github.com/jpadilla/pyjwt> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2022-202.yaml> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5PK7IQCBVNLYJEFTPHBBPFP72H4WUFNX> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6HIYEYZRQEP6QTHT3EHH3RGFYJIHIMAO> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6HIYEYZRQEP6QTHT3EHH3RGFYJIHIMAO/> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5PK7IQCBVNLYJEFTPHBBPFP72H4WUFNX/> (web)

## Sources

- CVE List: [CVE-2022-29217](https://www.cve.org/CVERecord?id=CVE-2022-29217), CVE Terms of Use, modified 2025-04-23
- GitHub Advisory Database: [GHSA-ffqj-6fqr-9h24](https://github.com/advisories/GHSA-ffqj-6fqr-9h24), CC-BY-4.0, modified 2024-10-15
- NVD: [CVE-2022-29217](https://nvd.nist.gov/vuln/detail/CVE-2022-29217), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2022-202](https://osv.dev/vulnerability/PYSEC-2022-202), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2022-29217 · Whole record: https://cve.day/CVE-2022-29217.json · Rebuilt by cve.day 2026-11-25T22:58:11.913Z
