CVE-2017-11424
Pyjwt Project Pyjwt vulnerability
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
Pyjwt, Debian Linux. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Pyjwt Project Pyjwt runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/jpadilla/pyjwt/pull/277 · Patch
- www.debian.org/security/2017/dsa-3979 · Third Party Advisory
- nvd.nist.gov/vuln/detail/CVE-2017-11424
- github.com/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2017-24.yaml
- github.com/advisories/GHSA-r9jw-mwhq-wp62
- nvd.nist.gov/vuln/detail/CVE-2017-11424
- cve.org/CVERecord?id=CVE-2017-11424
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.