Authentication Bypass Affecting jwcrypto package, versions [,1.4)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

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 Authentication Bypass vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-JWCRYPTO-3030035
  • published22 Sept 2022
  • disclosed21 Sept 2022
  • creditTom Tervoort of Secura

Introduced: 21 Sep 2022

CVE-2022-3102  (opens in a new tab)
CWE-287  (opens in a new tab)

How to fix?

Upgrade jwcrypto to version 1.4 or higher.

Overview

Affected versions of this package are vulnerable to Authentication Bypass because it is possible to auto-detect the type of token being provided. This can lead the application to incorrect conclusions about the trustworthiness of the token.

Mitigations

  1. If the private key corresponding to the public key used to encrypt the JWE is not available to the application an exception will be raised.

  2. If the JWK is specified with the 'use' parameter set to 'sig' (as expected for keys used only for signing/verification) an exception will be raised.

  3. If the JWK is specified with the 'key_ops' parameter set and it does not include the 'decrypt' operation an exception will be raised.

  4. Applications may check the token type before validation, in this case they would fail to detect an expected JWS

CVSS Scores

version 3.1