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. Upstream bug: https://github.com/jpadilla/pyjwt/pull/277
Created python-jwt tracking bugs for this issue: Affects: epel-7 [bug 1482530] Affects: fedora-all [bug 1482531]
CVE-2017-12880 was rejected in favour of CVE-2017-11424.
Analysis: Python-jwt is shipped as dependency for heketi in Red Hat Gluster Storage 3. Heketi only uses token signatures (used algorithm HMAC HS256). Python-jwt is affected by this CVE but it does not affect Red Hat Gluster Storage 3 in the way it is being used.