Skip to content
OpenAdvisories
High · 7.4 CVE-2022-29217 EUVD-2022-0213GHSA-ffqj-6fqr-9h24PYSEC-2022-202

Key confusion through non-blocklisted public key formats in PyJWT

Published May 24, 2022 · Updated Apr 23, 2025 · 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.

Affected products

VendorProductAffectedFixed
jpadilla pyjwt >= 1.5.0, < 2.4.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 pyjwt 2.4.0-1 —
Debian 13 pyjwt 2.4.0-1 —
Debian 12 pyjwt 2.4.0-1 —
ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS pyjwt 2.3.0-1ubuntu0.1 USN-5526-1
Ubuntu 20.04 LTS pyjwt 1.7.1-2ubuntu2.1 USN-5526-1
Ubuntu 18.04 LTS pyjwt 1.5.3+ds1-1ubuntu0.1 USN-5526-1
ReleasePackageFixed inAdvisory
SLES 15 SP4 python-PyJWT 1.7.1-150200.3.3.1 SUSE-SU-2023:0794-1, SUSE-SU-2022:2402-1
SLES 15 SP3 python-PyJWT 1.7.1-150200.3.3.1 SUSE-SU-2023:0794-1, SUSE-SU-2022:2402-1
SLES 15 SP2 python-PyJWT 1.7.1-150100.6.7.1 SUSE-SU-2023:0794-1, SUSE-SU-2022:2403-1, SUSE-SU-2022:2402-1
SLES 15 SP1 python-PyJWT 1.7.1-150100.6.7.1 SUSE-SU-2022:2403-1
SLES 15 python-PyJWT 1.5.3-150000.3.3.1 SUSE-SU-2022:3545-1
Show 16 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 python-PyJWT 1.5.3-3.16.1 SUSE-SU-2022:2401-1
SLES for SAP 15 SP3 python-PyJWT 2.4.0-150200.3.6.2 SUSE-SU-2023:0794-1
SLES for SAP 15 SP2 python-PyJWT 1.7.1-150200.3.3.1 SUSE-SU-2023:0794-1, SUSE-SU-2022:2402-1
SLES for SAP 15 SP1 python-PyJWT 1.7.1-150100.6.7.1 SUSE-SU-2022:2403-1
SLE Real Time 15 SP3 python-PyJWT 2.4.0-150200.3.6.2 SUSE-SU-2023:0794-1
SLE HPC 15 SP3 python-PyJWT 2.4.0-150200.3.6.2 SUSE-SU-2023:0794-1
SLE HPC 15 SP2 python-PyJWT 1.7.1-150200.3.3.1 SUSE-SU-2023:0794-1, SUSE-SU-2022:2402-1
SLE HPC 15 SP1 python-PyJWT 1.7.1-150100.6.7.1 SUSE-SU-2022:2403-1
SUSE Manager Server 4.2 python-PyJWT 2.4.0-150200.3.6.2 SUSE-SU-2023:0794-1
SUSE Manager Server 4.1 python-PyJWT 1.7.1-150200.3.3.1 SUSE-SU-2022:2402-1
SUSE Manager Retail Branch Server 4.1 python-PyJWT 1.7.1-150200.3.3.1 SUSE-SU-2022:2402-1
SUSE Manager Proxy 4.2 python-PyJWT 2.4.0-150200.3.6.2 SUSE-SU-2023:0794-1
SUSE Manager Proxy 4.1 python-PyJWT 1.7.1-150200.3.3.1 SUSE-SU-2022:2402-1
SUSE Enterprise Storage 7.1 python-PyJWT 2.4.0-150200.3.6.2 SUSE-SU-2023:0794-1
SUSE Enterprise Storage 7 python-PyJWT 1.7.1-150200.3.3.1 SUSE-SU-2023:0794-1, SUSE-SU-2022:2402-1
SUSE Enterprise Storage 6 python-PyJWT 1.7.1-150100.6.7.1 SUSE-SU-2022:2403-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-PyJWT 2.10.1-2.1 openSUSE-SU-2025:14987-1
openSUSE Leap 15.4 python-PyJWT 1.7.1-150200.3.3.1 SUSE-SU-2023:0794-1, SUSE-SU-2022:2402-1
openSUSE Leap 15.3 python-PyJWT 1.7.1-150200.3.3.1 SUSE-SU-2022:2402-1
ReleasePackageFixed inAdvisory
Alpine v3.24 py3-jwt 2.4.0-r0 —
Alpine v3.23 py3-jwt 2.4.0-r0 —
Alpine v3.22 py3-jwt 2.4.0-r0 —
Alpine v3.21 py3-jwt 2.4.0-r0 —
Alpine v3.20 py3-jwt 2.4.0-r0 —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 py3-jwt 2.4.0-r0 —
Alpine v3.18 py3-jwt 2.4.0-r0 —
Alpine v3.17 py3-jwt 2.4.0-r0 —
Alpine v3.16 py3-jwt 2.4.0-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 python3-jwt +1 2.4.0-1.amzn2023.0.1 ALAS2023-2023-076

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) python-jwt 2.4.0-1 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI pyjwt >= 1.5.0, < 2.4.0 2.4.0 GHSA-ffqj-6fqr-9h24

Advisories 9

References