CVE-2017-11424 json
PyJWT vulnerable to key confusion attacks
published 2017-08-24 9 y ago modified 2026-06-17 4 mo ago also GHSA-r9jw-mwhq-wp62 , PYSEC-2017-24 , EUVD-2017-0103
- cvss
- 7.5
- version 3.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.8%
- EPSS 1.8% chance of exploitation in 30 days, percentile 78%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi pyjwt 1.5.1
- pyjwt Debian 14, Debian 13, Debian 12 1.4.2-1.1
debian advisories DEBIAN-CVE-2017-11424
- pyjwt Ubuntu 16.04 LTS 1.3.0-1ubuntu0.1
ubuntu advisories UBUNTU-CVE-2017-11424
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/jpadilla/pyjwt#277 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2017-11424 updated cvss 5.3
python-jwt: Incorrect handling of PEM-encoded public keys
-
Red Hat Storage 3 python-jwtaffected: no fix planned “Will not fix”
-
Red Hat Enterprise Linux 7 python-jwtnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.80% chance of exploitation in the next 30 days, higher than 78% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.0 | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
| GitHub | 3.0 | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pyjwt | <1.5.1 |
1.5.1 |
References
-
github.com
/jpadilla/pyjwt/pull/277
web, issue-tracking, patch, third-party-advisory
-
debian.org
/security/2017/dsa-3979
vendor-advisory, web, third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2017-11424
advisory
-
github.com
/jpadilla/pyjwt
package
-
github.com
/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2017-24.yaml
web
-
github.com
/advisories/GHSA-r9jw-mwhq-wp62
advisory
Sources
- CVE List CVE-2017-11424
- GitHub Advisory GHSA-r9jw-mwhq-wp62
- NVD CVE-2017-11424
- OSV PYSEC-2017-24
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.