{"id":"CVE-2017-11424","published":"2017-08-24T16:00:00Z","modified":"2024-08-05T18:12:39Z","title":"In PyJWT 1.5.0 and below the `invalid_strings` check in `HMACAlgorithm.prepare_key` does not account for all PEM…","vendor":null,"product":null,"tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.01789,"percentile":0.78901,"provenance":"source"},"cwes":[],"references":[{"url":"http://www.debian.org/security/2017/dsa-3979","tags":["vendor-advisory","x_refsource_DEBIAN"]},{"url":"https://github.com/jpadilla/pyjwt/pull/277","tags":["x_refsource_CONFIRM"]}],"priority":{"score":15.8,"factors":[{"name":"EPSS percentile","points":15.78}]},"affected":[{"ecosystem":"PyPI","package":"pyjwt","vulnerableRanges":["<1.5.1"],"patched":["1.5.1"],"from":["GHSA-r9jw-mwhq-wp62","PYSEC-2017-24"],"provenance":"source"}],"summary":{"text":"The flaw is in the invalid_strings check in HMACAlgorithm.prepare_key within PyJWT 1.5.0 and below, which fails to reject PKCS1 PEM-encoded public keys (those beginning with -----BEGIN RSA PUBLIC KEY-----). Because of this gap, an attacker can carry out a symmetric/asymmetric key confusion attack against applications using such keys, enabling them to forge JWTs from scratch.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:39:20Z"},"euvd":{"id":"EUVD-2017-0103","exploited":false,"provenance":"source"}}