CVE-2022-29217
HIGH 7.5CVSS 3.1Key confusion through non-blocklisted public key formats
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.
- Published
- 24 May 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-327
- Also known as
- GHSA-ffqj-6fqr-9h24PYSEC-2022-202
- Sources
- NVDJSONOSV GHSA-ffqj-6fqr-9h24JSONOSV PYSEC-2022-202JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | pyjwt_project | pyjwtcpe:2.3:a:pyjwt_project:pyjwt:*:*:*:*:*:*:*:* |
>= 1.5.0, < 2.4.0 | 2.4.0 |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* |
= 35 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* |
= 36 | |
| OSV | PyPI | pyjwt | >= 1.5.0, < 2.4.0 | 2.4.0 |
References
- https://github.com/jpadilla/pyjwt/commit/9c528670c455b8d948aff95ed50e22940d1ad3fc · Patch, Third Party Advisory, WEB, FIX
- https://github.com/jpadilla/pyjwt/releases/tag/2.4.0 · Release Notes, Third Party Advisory, WEB
- https://github.com/jpadilla/pyjwt/security/advisories/GHSA-ffqj-6fqr-9h24 · Issue Tracking, Third Party Advisory, WEB, ADVISORY
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5PK7IQCBVNLYJEFTPHBBPFP72H4WUFNX/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6HIYEYZRQEP6QTHT3EHH3RGFYJIHIMAO/
- 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
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 24 May 2022)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 24 May 2022)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 24 May 2022)