Use of a Broken or Risky Cryptographic Algorithm Affecting python3-jwt package, versions <0:2.4.0-1.amzn2023.0.1


Severity

Recommended
medium

Based on Amazon Linux security rating.

Threat Intelligence

EPSS
1.36% (69th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-AMZN2023-PYTHON3JWT-3347856
  • published7 Mar 2023
  • disclosed24 May 2022

Introduced: 24 May 2022

CVE-2022-29217  (opens in a new tab)
CWE-327  (opens in a new tab)

How to fix?

Upgrade Amazon-Linux:2023 python3-jwt to version 0:2.4.0-1.amzn2023.0.1 or higher.
This issue was patched in ALAS2023-2023-076.

NVD Description

Note: Versions mentioned in the description apply only to the upstream python3-jwt package and not the python3-jwt package as distributed by Amazon-Linux. See How to fix? for Amazon-Linux:2023 relevant fixed versions and status.

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.

CVSS Base Scores

version 3.1