CVE-2022-29217 Key confusion through non-blocklisted public key formats in PyJWT
Attackers can bypass JWT signature verification by exploiting algorithm confusion when applications explicitly enable all default algorithms.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-29217?
CVE-2022-29217 is a high-severity vulnerability in Fedoraproject Fedora, published on 24 May 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-327
Which versions are affected by CVE-2022-29217?
3 open source packages ship an affected version, including pyjwt. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
pyjwt PyPI | From 1.5.0 | 2.4.0 |
pyjwt PyPI | From 1.5.0 | 2.4.0 |
pyjwt PyPI | From 1.5.0 | 2.4.0 |
Linux distribution packages (37)
python-PyJWT SUSE:Enterprise Storage 6 | All versions | 1.7.1-150100.6.7.1 |
python-PyJWT SUSE:Enterprise Storage 7 | All versions | 1.7.1-150200.3.3.1 |
python-PyJWT SUSE:Enterprise Storage 7 | All versions | 2.4.0-150200.3.6.2 |
python-PyJWT SUSE:Enterprise Storage 7.1 | All versions | 2.4.0-150200.3.6.2 |
python-PyJWT SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | All versions | 1.7.1-150100.6.7.1 |
python-PyJWT SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 1.7.1-150100.6.7.1 |
python-PyJWT SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | All versions | 1.7.1-150200.3.3.1 |
python-PyJWT SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 1.7.1-150200.3.3.1 |
python-PyJWT SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 2.4.0-150200.3.6.2 |
python-PyJWT SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 2.4.0-150200.3.6.2 |
python-PyJWT SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 2.4.0-150200.3.6.2 |
python-PyJWT SUSE:Linux Enterprise Module for Basesystem 15 SP3 | All versions | 1.7.1-150200.3.3.1 |
python-PyJWT SUSE:Linux Enterprise Module for Basesystem 15 SP4 | All versions | 1.7.1-150200.3.3.1 |
python-PyJWT SUSE:Linux Enterprise Module for Basesystem 15 SP4 | All versions | 2.4.0-150200.3.6.2 |
python-PyJWT SUSE:Linux Enterprise Module for Package Hub 15 SP3 | All versions | 1.7.1-150200.3.3.1 |
python-PyJWT SUSE:Linux Enterprise Module for Public Cloud 12 | All versions | 1.5.3-3.16.1 |
python-PyJWT SUSE:Linux Enterprise Module for Public Cloud 15 | All versions | 1.5.3-150000.3.3.1 |
python-PyJWT SUSE:Linux Enterprise Module for Public Cloud 15 SP1 | All versions | 1.7.1-150100.6.7.1 |
python-PyJWT SUSE:Linux Enterprise Module for Public Cloud 15 SP2 | All versions | 1.7.1-150100.6.7.1 |
python-PyJWT SUSE:Linux Enterprise Real Time 15 SP3 | All versions | 2.4.0-150200.3.6.2 |
python-PyJWT SUSE:Linux Enterprise Server 15 SP1-BCL | All versions | 1.7.1-150100.6.7.1 |
python-PyJWT SUSE:Linux Enterprise Server 15 SP1-LTSS | All versions | 1.7.1-150100.6.7.1 |
python-PyJWT SUSE:Linux Enterprise Server 15 SP2-BCL | All versions | 1.7.1-150200.3.3.1 |
python-PyJWT SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 1.7.1-150200.3.3.1 |
python-PyJWT SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 2.4.0-150200.3.6.2 |
python-PyJWT SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 2.4.0-150200.3.6.2 |
python-PyJWT SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | All versions | 1.7.1-150100.6.7.1 |
python-PyJWT SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 1.7.1-150200.3.3.1 |
python-PyJWT SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 2.4.0-150200.3.6.2 |
python-PyJWT SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 2.4.0-150200.3.6.2 |
python-PyJWT SUSE:Manager Proxy 4.1 | All versions | 1.7.1-150200.3.3.1 |
python-PyJWT SUSE:Manager Proxy 4.2 | All versions | 2.4.0-150200.3.6.2 |
python-PyJWT SUSE:Manager Retail Branch Server 4.1 | All versions | 1.7.1-150200.3.3.1 |
python-PyJWT SUSE:Manager Server 4.1 | All versions | 1.7.1-150200.3.3.1 |
python-PyJWT SUSE:Manager Server 4.2 | All versions | 2.4.0-150200.3.6.2 |
python-PyJWT openSUSE:Leap 15.3 | All versions | 1.7.1-150200.3.3.1 |
python-PyJWT openSUSE:Leap 15.4 | All versions | 1.7.1-150200.3.3.1 |
Products include Fedoraproject Fedora, Pyjwt Project Pyjwt.
How do I fix CVE-2022-29217?
Upgrade pyjwt to 2.4.0 or later.
Is CVE-2022-29217 being exploited?
There is no known exploitation of CVE-2022-29217 in the wild and no public exploit code.
Other vulnerabilities in Fedoraproject Fedora
Sources
Also known as AZL-9852, CLSA-2025-1756858338, DEBIAN-CVE-2022-29217, GHSA-ffqj-6fqr-9h24, MGASA-2022-0244, OESA-2022-1710 and 11 more.