CVE-2017-11424

NameCVE-2017-11424
DescriptionIn 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SuSE, Mageia, GitHub code/issues, web search, more)
ReferencesDSA-3979-1
NVD severitymedium (attack range: remote)
Debian Bugs873244

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
pyjwt (PTS)jessie0.2.1-1+deb8u1vulnerable
jessie (security)0.2.1-1+deb8u2fixed
buster, sid, stretch1.4.2-1vulnerable
stretch (security)1.4.2-1+deb9u1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
pyjwtsource(unstable)(unfixed)medium873244
pyjwtsourcejessie0.2.1-1+deb8u2mediumDSA-3979-1
pyjwtsourcestretch1.4.2-1+deb9u1mediumDSA-3979-1

Notes

https://github.com/jpadilla/pyjwt/pull/277

Search for package or bug name: Reporting problems