CVE-2017-11424
HIGH 7.5CVSS 3.0PyJWT vulnerable to key confusion attacks
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.
- Published
- 24 Aug 2017
- Last modified
- 17 Jun 2026
- Assigned by
- security@duo.com
- NVD status
- Modified
- Also known as
- GHSA-r9jw-mwhq-wp62PYSEC-2017-24
- Sources
- NVDJSONOSV GHSA-r9jw-mwhq-wp62JSONOSV PYSEC-2017-24JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.0 | HIGH 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.0 | HIGH 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | pyjwt_project | pyjwtcpe:2.3:a:pyjwt_project:pyjwt:*:*:*:*:*:*:*:* |
<= 1.5.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:* |
= 8.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* |
= 9.0 | |
| OSV | PyPI | pyjwt | < 1.5.1 | 1.5.1 |
References
- http://www.debian.org/security/2017/dsa-3979 · Third Party Advisory, WEB, ADVISORY
- https://github.com/jpadilla/pyjwt/pull/277 · Issue Tracking, Patch, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2017-11424 · ADVISORY
- https://github.com/jpadilla/pyjwt · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2017-24.yaml · WEB
- https://github.com/advisories/GHSA-r9jw-mwhq-wp62 · ADVISORY
History
- 25 Nov 2026 20:20 UTC · NVD: first stored (published 24 Aug 2017)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 24 Aug 2017)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 13 May 2022)