{"id":2445,"cve":"CVE-2026-102273","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-102273\/","cwe":"CWE-347","cwe_number":347,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/347","cvss_score":7.4,"published":"2026-09-28","owasp":"A02 Cryptographic Failures","odc":"Checking","cdc":"Missing Check","category":"Authentication, Authorization, and Session Management","subcategory":"Insecure Authentication Mechanisms","scope":"Remote","impact":"Unauthorized Access","summary":"Public JWK container accepted as HMAC secret, enabling token forgery.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-102273\/","description":"PyJWT is a Python implementation of JSON Web Token standards. From 2.13.0 until 2.14.0, PyJWT HMACAlgorithm.prepare_key is affected because HMAC key guard only recognizes top-level public JWK forms and misses container representations. This occurs when an application allows HMAC and asymmetric algorithms and passes a public JWK container as the raw key. As a result, public asymmetric key material is accepted as the HMAC secret. Consequently, an attacker who knows the public key can forge a token with arbitrary authenticated claims. This issue is fixed in version 2.14.0.","solution":"Upgrade PyJWT to version\u202f2.14.0\u202for later.","affected_component":"PyJWT","fixed_by_upgrading":true,"vulnerable_code":"import jwt\n\ndef verify_token(token: str, key):\n    # VULNERABLE: accepts public JWK as HMAC secret\n    return jwt.decode(token, key, algorithms=[\"HS256\", \"RS256\"])\n","patched_code":"import jwt\n\ndef verify_token(token: str, key):\n    # FIX: reject JWK objects for HMAC verification\n    if isinstance(key, dict):\n        raise TypeError(\"JWK objects must not be used as HMAC secret\")\n    return jwt.decode(token, key, algorithms=[\"HS256\", \"RS256\"])\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[{"repository":"jpadilla\/pyjwt","commit_url":"https:\/\/github.com\/jpadilla\/pyjwt\/commit\/801cd128528c62d9b23fcd161d1a2e1c17982f95","commit_subject":"fix: reject public JWK container HMAC keys","units":[{"file":"jwt\/algorithms.py","function":"HMACAlgorithm.prepare_key"}]}],"references":null}