Use of a Broken or Risky Cryptographic Algorithm Affecting py3-jwt package, versions <2.4.0-r0


Severity

Recommended
0.0
high
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.15% (52nd 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 Learn

Learn about Use of a Broken or Risky Cryptographic Algorithm vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-ALPINE320-PY3JWT-7013703
  • published23 May 2024
  • 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 Alpine:3.20 py3-jwt to version 2.4.0-r0 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream py3-jwt package and not the py3-jwt package as distributed by Alpine. See How to fix? for Alpine:3.20 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 Scores

version 3.1