CVE-2017-11424
mediumpriority · track · 31OT risk · elevatedEPSS 0.018 · 78 %ileEUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 5–7.5
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (5)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- GHSA-r9jw-mwhq-wp62PyJWT vulnerable to key confusion attacks2022-05-13ghsa · osvUS
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.
- PYSEC-2017-242017-08-24vendor · osvUS
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.
also known as (6)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (8)
External citations — patches, advisories, analysis.
- http://www.debian.org/security/2017/dsa-3979cnnvd
- https://github.com/jpadilla/pyjwt/pull/277cnnvd
- https://github.com/jpadilla/pyjwt/pull/277/commitsPatchcnnvd
- https://www.debian.org/security/2017/dsa-3979cnnvd
- http://www.debian.org/security/2017/dsa-3979enisa_euvd
- https://github.com/jpadilla/pyjwt/pull/277enisa_euvd
- http://www.debian.org/security/2017/dsa-3979Third Party Advisorynvd
- https://github.com/jpadilla/pyjwt/pull/277Issue TrackingPatchThird Party Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan