CVE Catalog

CVE-2017-11424

High
Published: Translated: NVD NIST

Summary

In PyJWT versions 1.5.0 and below, the `invalid_strings` check in `HMACAlgorithm.prepare_key` does not account for all PEM encoded public keys. Specifically, the PKCS1 PEM encoded format is allowed, enabling symmetric/asymmetric key confusion attacks.

Risk Assessment

An attacker could craft fake JWTs, leading to serious security vulnerabilities in applications using PKCS1 PEM keys. This could result in unauthorized access to user data.

Recommendation

It is recommended to update PyJWT to a version above 1.5.0 to mitigate this vulnerability. Additionally, an audit of the public keys used in the application should be conducted.

Other vulnerabilities in PyJWT

See all
Original NVD description (English source)

In PyJWT 1.5.0 and below the `invalid_strings` check in `HMACAlgorithm.prepare_key` does not account for all PEM encoded public keys. Specifically, the PKCS1 PEM encoded format would be allowed because it is prefaced with the string `-----BEGIN RSA PUBLIC KEY-----` which is not accounted for. This enables symmetric/asymmetric key confusion attacks against users using the PKCS1 PEM encoded public keys, which would allow an attacker to craft JWTs from scratch.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS