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

High 7.4 Published Updated

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.

PackageAffectedFixed in
pyjwt PyPIFrom 1.5.02.4.0
pyjwt PyPIFrom 1.5.02.4.0
pyjwt PyPIFrom 1.5.02.4.0
Linux distribution packages (37)
python-PyJWT SUSE:Enterprise Storage 6All versions1.7.1-150100.6.7.1
python-PyJWT SUSE:Enterprise Storage 7All versions1.7.1-150200.3.3.1
python-PyJWT SUSE:Enterprise Storage 7All versions2.4.0-150200.3.6.2
python-PyJWT SUSE:Enterprise Storage 7.1All versions2.4.0-150200.3.6.2
python-PyJWT SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOSAll versions1.7.1-150100.6.7.1
python-PyJWT SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSSAll versions1.7.1-150100.6.7.1
python-PyJWT SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOSAll versions1.7.1-150200.3.3.1
python-PyJWT SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSSAll versions1.7.1-150200.3.3.1
python-PyJWT SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSSAll versions2.4.0-150200.3.6.2
python-PyJWT SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOSAll versions2.4.0-150200.3.6.2
python-PyJWT SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSAll versions2.4.0-150200.3.6.2
python-PyJWT SUSE:Linux Enterprise Module for Basesystem 15 SP3All versions1.7.1-150200.3.3.1
python-PyJWT SUSE:Linux Enterprise Module for Basesystem 15 SP4All versions1.7.1-150200.3.3.1
python-PyJWT SUSE:Linux Enterprise Module for Basesystem 15 SP4All versions2.4.0-150200.3.6.2
python-PyJWT SUSE:Linux Enterprise Module for Package Hub 15 SP3All versions1.7.1-150200.3.3.1
python-PyJWT SUSE:Linux Enterprise Module for Public Cloud 12All versions1.5.3-3.16.1
python-PyJWT SUSE:Linux Enterprise Module for Public Cloud 15All versions1.5.3-150000.3.3.1
python-PyJWT SUSE:Linux Enterprise Module for Public Cloud 15 SP1All versions1.7.1-150100.6.7.1
python-PyJWT SUSE:Linux Enterprise Module for Public Cloud 15 SP2All versions1.7.1-150100.6.7.1
python-PyJWT SUSE:Linux Enterprise Real Time 15 SP3All versions2.4.0-150200.3.6.2
python-PyJWT SUSE:Linux Enterprise Server 15 SP1-BCLAll versions1.7.1-150100.6.7.1
python-PyJWT SUSE:Linux Enterprise Server 15 SP1-LTSSAll versions1.7.1-150100.6.7.1
python-PyJWT SUSE:Linux Enterprise Server 15 SP2-BCLAll versions1.7.1-150200.3.3.1
python-PyJWT SUSE:Linux Enterprise Server 15 SP2-LTSSAll versions1.7.1-150200.3.3.1
python-PyJWT SUSE:Linux Enterprise Server 15 SP2-LTSSAll versions2.4.0-150200.3.6.2
python-PyJWT SUSE:Linux Enterprise Server 15 SP3-LTSSAll versions2.4.0-150200.3.6.2
python-PyJWT SUSE:Linux Enterprise Server for SAP Applications 15 SP1All versions1.7.1-150100.6.7.1
python-PyJWT SUSE:Linux Enterprise Server for SAP Applications 15 SP2All versions1.7.1-150200.3.3.1
python-PyJWT SUSE:Linux Enterprise Server for SAP Applications 15 SP2All versions2.4.0-150200.3.6.2
python-PyJWT SUSE:Linux Enterprise Server for SAP Applications 15 SP3All versions2.4.0-150200.3.6.2
python-PyJWT SUSE:Manager Proxy 4.1All versions1.7.1-150200.3.3.1
python-PyJWT SUSE:Manager Proxy 4.2All versions2.4.0-150200.3.6.2
python-PyJWT SUSE:Manager Retail Branch Server 4.1All versions1.7.1-150200.3.3.1
python-PyJWT SUSE:Manager Server 4.1All versions1.7.1-150200.3.3.1
python-PyJWT SUSE:Manager Server 4.2All versions2.4.0-150200.3.6.2
python-PyJWT openSUSE:Leap 15.3All versions1.7.1-150200.3.3.1
python-PyJWT openSUSE:Leap 15.4All versions1.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.

All Fedoraproject Fedora vulnerabilities

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.

Is CVE-2022-29217 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free