Skip to content

CVE-2017-11424 PyJWT vulnerable to key confusion attacks

HighCVSS 7.5 EPSS 1.8%
Published
Updated
Exploit status
No public exploit known

Description

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.

Affected products

ProductAffected versionsFixed in
pypi pyjwt(PyPI) < 1.5.1 1.5.1
pypi pyjwt(PyPI) = 0.1.1 No fix listed
pypi pyjwt(PyPI) = 0.1.2 No fix listed
pypi pyjwt(PyPI) = 0.1.3 No fix listed
pypi pyjwt(PyPI) = 0.1.4 No fix listed
pypi pyjwt(PyPI) = 0.1.5 No fix listed
pypi pyjwt(PyPI) = 0.1.6 No fix listed
pypi pyjwt(PyPI) = 0.1.7 No fix listed
pypi pyjwt(PyPI) = 0.1.8 No fix listed
pypi pyjwt(PyPI) = 0.1.9 No fix listed
pypi pyjwt(PyPI) = 0.2.0 No fix listed
pypi pyjwt(PyPI) = 0.2.1 No fix listed
pypi pyjwt(PyPI) = 0.2.3 No fix listed
pypi pyjwt(PyPI) = 0.3.0 No fix listed
pypi pyjwt(PyPI) = 0.3.1 No fix listed
pypi pyjwt(PyPI) = 0.3.2 No fix listed
pypi pyjwt(PyPI) = 0.4.0 No fix listed
pypi pyjwt(PyPI) = 0.4.1 No fix listed
pypi pyjwt(PyPI) = 0.4.2 No fix listed
pypi pyjwt(PyPI) = 0.4.3 No fix listed
pypi pyjwt(PyPI) = 1.0.0 No fix listed
pypi pyjwt(PyPI) = 1.0.1 No fix listed
pypi pyjwt(PyPI) = 1.1.0 No fix listed
pypi pyjwt(PyPI) = 1.3.0 No fix listed
pypi pyjwt(PyPI) = 1.4.0 No fix listed
Show 9 more
ProductAffected versionsFixed in
pypi pyjwt(PyPI) = 1.4.1 No fix listed
pypi pyjwt(PyPI) = 1.4.2 No fix listed
pypi pyjwt(PyPI) = 1.5.0 No fix listed
debian/pyjwt(Debian:12) < 1.4.2-1.1 1.4.2-1.1
debian/pyjwt(Debian:13) < 1.4.2-1.1 1.4.2-1.1
debian/pyjwt(Debian:14) < 1.4.2-1.1 1.4.2-1.1
pyjwt project pyjwt <= 1.5.0 No fix listed
debian linux = 8.0 No fix listed
debian linux = 9.0 No fix listed

References