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


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-AMZN2022-PYTHON3JWTCRYPTO-3164276
  • published8 Dec 2022
  • 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:2022 python3-jwt+crypto to version 0:2.4.0-1.amzn2022 or higher.
This issue was patched in ALAS2022-2022-241.

NVD Description

Note: Versions mentioned in the description apply only to the upstream python3-jwt+crypto package and not the python3-jwt+crypto package as distributed by Amazon-Linux. See How to fix? for Amazon-Linux:2022 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