{"id":"CVE-2026-102268","published":"2026-09-28T20:26:13Z","modified":"2026-09-29T13:59:11Z","title":"PyJWT: Asymmetric-PEM detection bypass: whitespace/line-ending-mutated public keys skip the HS/asymmetric confusion…","vendor":"jpadilla","product":"pyjwt","tier":"tail","description":{"text":"PyJWT is a Python implementation of JSON Web Token standards. Prior to 2.14.0, is_pem_format in jwt/utils.py is affected because is_pem_format does not recognize every PEM representation accepted by the cryptography loader. This occurs when an application mixes HMAC and asymmetric algorithms and supplies a mutated public-key PEM as raw key bytes. As a result, HMACAlgorithm.prepare_key treats the unrecognized asymmetric public key 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":9.1,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00325,"percentile":0.17964,"provenance":"source"},"cwes":[{"id":"CWE-347","name":"Improper Verification of Cryptographic Signature"}],"references":[{"url":"https://github.com/jpadilla/pyjwt/security/advisories/GHSA-ffc3-869f-jxw9","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/jpadilla/pyjwt/commit/8b4e233a22206b34ec1186e912e75c0b2396ac07","tags":["x_refsource_MISC"]},{"url":"https://github.com/jpadilla/pyjwt/releases/tag/2.14.0","tags":["x_refsource_MISC"]}],"priority":{"score":15.0,"factors":[{"name":"EPSS percentile","points":3.59},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.37}]},"exploitSources":{"pocGithub":{"count":2,"skipped":0,"earliest":"2026-10-02","earliestUrl":"https://github.com/covepseng/cve-2026-102268-poc","repos":[{"name":"covepseng/cve-2026-102268-poc","url":"https://github.com/covepseng/cve-2026-102268-poc","stars":0,"created":"2026-10-02"},{"name":"federiconbaez/cortex9-pyjwt-pem-detection-alg-confusion-model","url":"https://github.com/federiconbaez/cortex9-pyjwt-pem-detection-alg-confusion-model","stars":0,"created":"2026-11-09"}]},"first":{"date":"2026-10-02","source":"PoC-in-GitHub","url":"https://github.com/covepseng/cve-2026-102268-poc"},"provenance":"source"},"vendorSlug":"jpadilla","affectedVersions":[{"vendor":"jpadilla","product":"pyjwt","versions":["< 2.14.0"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2026-09-29T13:59:05.202281Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"PyJWT","vulnerableRanges":["<2.14.0"],"patched":["2.14.0"],"from":["GHSA-ffc3-869f-jxw9","PYSEC-2026-4145"],"provenance":"source"}],"summary":{"text":"PyJWT (the Python JSON Web Token library, jpadilla's pyjwt) contains a flaw in the is_pem_format function in jwt/utils.py, which fails to recognise every PEM encoding that the cryptography loader accepts, so a mutated public-key PEM supplied as raw HMAC key bytes is treated as an HMAC secret. An attacker who knows the public key and can present tokens to an application that mixes HMAC and asymmetric algorithms can forge authenticated HMAC-signed tokens, with no authentication required and no user interaction needed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-23T07:20:12Z"},"euvd":{"id":"EUVD-2026-88535","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-jpadilla-pyjwt-cve-2022-29217","parents":[{"from":"CVE-2022-29217","to":"CVE-2026-102268","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["jwt/utils.py"],"commits":["https://github.com/jpadilla/pyjwt/commit/9c528670c455b8d948aff95ed50e22940d1ad3fc","https://github.com/jpadilla/pyjwt/commit/8b4e233a22206b34ec1186e912e75c0b2396ac07"],"basis":"shared function","functions":["raw_to_der_signature"]}]}]}}