{"id":"CVE-2017-11424","aliases":["DEBIAN-CVE-2017-11424","DSA-3979-1","EUVD-2017-0103","GHSA-r9jw-mwhq-wp62","PYSEC-2017-24","UBUNTU-CVE-2017-11424","USN-3407-1"],"status":"published","title":"PyJWT vulnerable to key confusion attacks","description":"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.","severity":{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.01804,"percentile":0.78692,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2017-08-24T00:00:00Z","modified":"2026-10-20T10:48:01Z","fixes":[{"ecosystem":"PyPI","package":"pyjwt","fixed_in":["1.5.1"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"pyjwt","fixed_in":["1.4.2-1.1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"pyjwt","fixed_in":["1.4.2-1.1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"pyjwt","fixed_in":["1.4.2-1.1"],"sources":["osv"]},{"ecosystem":"Debian:8","package":"pyjwt","fixed_in":["0.2.1-1+deb8u2"],"sources":["osv"]},{"ecosystem":"Debian:9","package":"pyjwt","fixed_in":["1.4.2-1+deb9u1"],"sources":["osv"]},{"ecosystem":"Ubuntu:16.04:LTS","package":"pyjwt","fixed_in":["1.3.0-1ubuntu0.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"pyjwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.5.1"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"pyjwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.2-1.1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"pyjwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.2-1.1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"pyjwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.2-1.1"}]}]},{"source":"osv","ecosystem":"Debian:8","package":"pyjwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.2.1-1+deb8u2"}]}],"versions":["0.2.1-1","0.2.1-1+deb8u1"]},{"source":"osv","ecosystem":"Debian:9","package":"pyjwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.2-1+deb9u1"}]}],"versions":["1.4.2-1"]},{"source":"osv","ecosystem":"PyPI","package":"pyjwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.5.1"}]}],"versions":["0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.1.8","0.1.9","0.2.0","0.2.1","0.2.3","0.3.0","0.3.1","0.3.2","0.4.0","0.4.1","0.4.2","0.4.3","1.0.0","1.0.1","1.1.0","1.3.0","1.4.0","1.4.1","1.4.2","1.5.0"]},{"source":"osv","ecosystem":"PyPI","package":"pyjwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.5.1"}]}],"versions":["0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.1.8","0.1.9","0.2.0","0.2.1","0.2.3","0.3.0","0.3.1","0.3.2","0.4.0","0.4.1","0.4.2","0.4.3","1.0.0","1.0.1","1.1.0","1.3.0","1.4.0","1.4.1","1.4.2","1.5.0"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"pyjwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.0-1ubuntu0.1"}]}],"versions":["1.0.0-0ubuntu1","1.3.0-1"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"pyjwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.0-1ubuntu0.1"}]}],"versions":["1.0.0-0ubuntu1","1.3.0-1"]}],"products":[{"vendor":"debian","product":"debian_linux"},{"vendor":"pyjwt_project","product":"pyjwt"}],"references":[{"url":"http://www.debian.org/security/2017/dsa-3979","tags":["vendor-advisory","x_refsource_DEBIAN","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/jpadilla/pyjwt/pull/277","tags":["x_refsource_CONFIRM","x_transferred","Issue Tracking","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2017-11424","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2017-24.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-r9jw-mwhq-wp62","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2017-11424","tags":["advisory"]},{"url":"https://github.com/jpadilla/pyjwt","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2017-11424","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-3407-1","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2017-11424","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2017-11424","description":"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.","status":"published","published":"2017-08-24T16:00:00Z","modified":"2024-08-05T18:12:39.55Z","updated_at":"2026-11-02T14:33:20.171335Z"}],"euvd":[{"id":"EUVD-2017-0103","description":"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.","status":"published","published":"2017-08-24T16:00:00Z","modified":"2024-08-05T18:12:39Z","updated_at":"2026-11-03T02:23:23.645757Z"}],"ghsa":[{"id":"GHSA-r9jw-mwhq-wp62","title":"PyJWT vulnerable to key confusion attacks","description":"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.","status":"published","published":"2022-05-13T01:42:19Z","modified":"2024-10-15T16:34:42Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"updated_at":"2026-11-02T14:38:10.696798Z"}],"nvd":[{"id":"CVE-2017-11424","description":"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.","status":"published","published":"2017-08-24T16:29:00.197Z","modified":"2026-06-17T01:01:47.717Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"updated_at":"2026-11-02T14:03:57.82609Z"}],"osv":[{"id":"CVE-2017-11424","description":"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.","status":"published","published":"2017-08-24T16:29:00.197Z","modified":"2026-10-20T10:48:01.335372797Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"updated_at":"2026-11-02T15:44:03.851821Z"},{"id":"DEBIAN-CVE-2017-11424","description":"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.","status":"published","published":"2017-08-24T16:29:00.197Z","modified":"2026-09-01T20:03:41.622542293Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"updated_at":"2026-11-02T15:45:28.50097Z"},{"id":"GHSA-r9jw-mwhq-wp62","title":"PyJWT vulnerable to key confusion attacks","description":"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.","status":"published","published":"2022-05-13T01:42:19Z","modified":"2024-12-05T05:30:36.784778Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"updated_at":"2026-11-02T15:46:55.480549Z"},{"id":"UBUNTU-CVE-2017-11424","description":"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.","status":"published","published":"2017-08-24T00:00:00Z","modified":"2026-02-04T02:53:04.999079Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"updated_at":"2026-11-02T15:54:13.729565Z"},{"id":"DSA-3979-1","title":"pyjwt - security update","status":"published","published":"2017-09-19T00:00:00Z","modified":"2026-03-09T01:18:00.96958Z","updated_at":"2026-11-02T15:46:16.523846Z"},{"id":"PYSEC-2017-24","description":"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.","status":"published","published":"2017-08-24T16:29:00Z","modified":"2023-11-08T03:58:49.23486Z","updated_at":"2026-11-02T15:52:51.645172Z"},{"id":"USN-3407-1","title":"pyjwt vulnerability","description":"It was discovered that a vulnerability in PyJWT doesn't check\ninvalid_strings properly for some public keys. A remote attacker\ncould take advantage of a key confusion to craft JWTs from scratch.\n","status":"published","published":"2017-08-30T18:52:29Z","modified":"2026-02-10T04:41:12Z","updated_at":"2026-11-02T16:58:13.496563Z"}]}}
