{"id":"CVE-2026-102271","published":"2026-09-28T20:31:53Z","modified":"2026-10-01T14:57:42Z","title":"PyJWT: Public keys in DER form are accepted as HMAC secrets, bypassing the CVE-2022-29217 guard","vendor":"jpadilla","product":"pyjwt","tier":"tail","description":{"text":"PyJWT is a Python implementation of JSON Web Token standards. From 2.4.0 until 2.14.0, PyJWT HMACAlgorithm.prepare_key is affected because asymmetric-key guard relies on textual markers that are absent from DER encoding. This occurs when an application mixes HMAC and asymmetric algorithms and supplies a DER public key as the shared verification key. As a result, PyJWT uses public DER bytes as an HMAC secret. Consequently, an attacker who knows the public key can forge authenticated HMAC tokens. This issue is fixed in version 2.14.0.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.4,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00287,"percentile":0.1386,"provenance":"source"},"cwes":[{"id":"CWE-347","name":"Improper Verification of Cryptographic Signature"}],"references":[{"url":"https://github.com/jpadilla/pyjwt/security/advisories/GHSA-p4g4-x82p-q773","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/jpadilla/pyjwt/commit/2798504fa2663364573cf2d1043d8d7fef389499","tags":["x_refsource_MISC"]},{"url":"https://github.com/jpadilla/pyjwt/releases/tag/2.14.0","tags":["x_refsource_MISC"]}],"priority":{"score":8.0,"factors":[{"name":"EPSS percentile","points":2.77},{"name":"CVSS severity","points":5.18}]},"vendorSlug":"jpadilla","affectedVersions":[{"vendor":"jpadilla","product":"pyjwt","versions":[">= 2.4.0, < 2.14.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-10-01T14:57:03.181101Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"pyjwt","vulnerableRanges":[">=2.4.0, <2.14.0"],"patched":["2.14.0"],"from":["GHSA-p4g4-x82p-q773","PYSEC-2026-4149"],"provenance":"source"}],"summary":{"text":"PyJWT's HMACAlgorithm.prepare_key, in the 2.4.0 through 2.14.0 releases, fails to reject DER-encoded public keys supplied as HMAC secrets, because its asymmetric-key guard depends on textual PEM markers that DER encoding lacks. An attacker who knows the public key and can submit tokens to an application that mixes HMAC and asymmetric algorithms and passes a DER public key as the shared verification key can forge HMAC-signed tokens that the application will accept as authentic.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:12:10Z"},"euvd":{"id":"EUVD-2026-88539","exploited":false,"provenance":"source"}}