CVE-2022-29217 json
Key confusion through non-blocklisted public key formats in PyJWT
published 4y ago modified 4mo ago also GHSA-ffqj-6fqr-9h24 , PYSEC-2022-202 , EUVD-2022-0213
- cvss
- 7.4
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.4%
- EPSS 1.4% chance of exploitation in 30 days, percentile 71%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi pyjwt 2.4.0
- pyjwt_project pyjwt 2.4.0
- pyjwt Debian 14, Debian 13, Debian 12 2.4.0-1
debian advisories DEBIAN-CVE-2022-29217
- pyjwt Ubuntu 18.04 LTS 1.5.3+ds1-1ubuntu0.1
- pyjwt Ubuntu 20.04 LTS 1.7.1-2ubuntu2.1
- pyjwt Ubuntu 22.04 LTS 2.3.0-1ubuntu0.1
ubuntu advisories UBUNTU-CVE-2022-29217
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python-PyJWT SLES for SAP 15 SP3, SLES for SAP 15 SP2, SLES 15 SP3-LTSS +11 more 2.4.0-150200.3.6.2
- python-PyJWT SLE Module for Public Cloud 15 1.5.3-150000.3.3.1
- python-PyJWT SLES for SAP 15 SP1, SLES 15 SP1-LTSS, SLES 15 SP1-BCL +5 more 1.7.1-150100.6.7.1
- python-PyJWT SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +11 more 1.7.1-150200.3.3.1
- python-PyJWT SLE Module for Public Cloud 12 1.5.3-3.16.1
suse advisories SUSE-SU-2023:0794-1SUSE-SU-2022:3545-1SUSE-SU-2022:2403-1SUSE-SU-2022:2402-1SUSE-SU-2022:2401-1
- python-PyJWT openSUSE Tumbleweed 2.10.1-2.1
opensuse advisories openSUSE-SU-2025:14987-1
- py3-jwt Alpine 3.24, Alpine 3.23, Alpine 3.22 +6 more 2.4.0-r0
alpine advisories ALPINE-CVE-2022-29217
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python-jwt CBL-Mariner 2.0 2.4.0-1
azure linux advisories AZL-9852
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
- python-pyjwt Arch Linux 2.4.0-1
arch linux advisories AVG-2781
Is CVE-2022-29217 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-29217 updated cvss 7.5
python-jwt: Key confusion through non-blocklisted public key formats
-
Red Hat Ansible Automation Platform 2 python-pyjwt, automation-controller, python-pulp-containeraffected: no fix available
-
Red Hat Ceph Storage 4 python2-jwt, python3-adalaffected: no fix available, no fix planned “Will not fix”
-
Red Hat Ceph Storage 5 python-adal Red Hat Enterprise Linux 8 python-jwt, python3-jwt Red Hat Enterprise Linux 9 fence-virt, fence-virtd, fence-agents, fence-virtd-cpg, fence-virtd-tcp, fence-agents-all, +51 moreaffected: no fix planned “Will not fix”
-
Red Hat Openshift Container Storage 4 python-adal Red Hat OpenStack Platform 13 (Queens) python-jwtaffected: no fix planned “Out of support scope”
-
Red Hat Quay 3 quay/quay-rhel8 Red Hat Satellite 6 python-pulp-containeraffected: no fix available
-
Red Hat Storage 3 python-jwtaffected: no fix planned “Will not fix”
-
Red Hat Enterprise Linux 7 python-jwt, python-adal Red Hat Enterprise Linux 9 python3-oauthlib Red Hat Openshift Data Foundation 4 python-adal Red Hat OpenStack Platform 16.1 python3-adal, python3-mistral, openstack-mistral-all, openstack-mistral-api, openstack-mistral-common, openstack-mistral-engine, +3 more Red Hat OpenStack Platform 16.2 python3-adal, python3-mistral, python3-keystone, openstack-keystone, openstack-mistral-all, openstack-mistral-api, +5 more Red Hat Satellite 6 python-pyjwt, python3-pyjwtnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- last yr.
Exploit prediction
1.36% chance of exploitation in the next 30 days, higher than 71% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.4 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
| GitHub | 3.1 | 7.4 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pyjwt | >=1.5.0, <2.4.0 |
2.4.0 |
Affected products
- jpadilla pyjwt
Classification
- Weakness
-
- CWE-327 Use of a Broken or Risky Cryptographic Algorithm
References
-
github.com
/jpadilla/pyjwt/commit/9c528670c455b8d948aff95ed50e22940d1ad3fc
web, patch, third-party-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/6HIYEYZRQEP6QTHT3EHH3RGFYJIHIMAO/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/5PK7IQCBVNLYJEFTPHBBPFP72H4WUFNX/
vendor-advisory
-
github.com
/jpadilla/pyjwt/security/advisories/GHSA-ffqj-6fqr-9h24
web, issue-tracking, third-party-advisory, advisory
-
github.com
/jpadilla/pyjwt/releases/tag/2.4.0
web, release-notes, third-party-advisory
- vicarius.io /vsociety/posts/risky-algorithms-algorithm-confusion-in-pyjwt-cve-2022-29217
-
nvd.nist.gov
/vuln/detail/CVE-2022-29217
advisory
-
github.com
/jpadilla/pyjwt
package
-
github.com
/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2022-202.yaml
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/5PK7IQCBVNLYJEFTPHBBPFP72H4WUFNX
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/6HIYEYZRQEP6QTHT3EHH3RGFYJIHIMAO
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/6HIYEYZRQEP6QTHT3EHH3RGFYJIHIMAO/
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/5PK7IQCBVNLYJEFTPHBBPFP72H4WUFNX/
web
Sources
- CVE List CVE-2022-29217
- GitHub Advisory GHSA-ffqj-6fqr-9h24
- NVD CVE-2022-29217
- OSV PYSEC-2022-202
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.