CVE-2017-11424 PyJWT vulnerable to key confusion attacks
Attackers can bypass JWT signature verification using PKCS1 PEM keys, allowing them to forge tokens and impersonate users.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2017-11424?
CVE-2017-11424 is a high-severity vulnerability in Debian Debian Linux, published on 24 Aug 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Which versions are affected by CVE-2017-11424?
3 open source packages ship an affected version, including pyjwt. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
pyjwt PyPI | All versions | 1.5.1 |
pyjwt PyPI | All versions | 1.5.1 |
pyjwt PyPI | All versions | 1.5.1 |
Products include Debian Debian Linux, Pyjwt Project Pyjwt.
How do I fix CVE-2017-11424?
Upgrade pyjwt to 1.5.1 or later.
Is CVE-2017-11424 being exploited?
There is no known exploitation of CVE-2017-11424 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as CVE-2017-12880, DEBIAN-CVE-2017-11424, DSA-3979-1, GHSA-r9jw-mwhq-wp62, PYSEC-2017-24, UBUNTU-CVE-2017-11424 and 1 more.