CyberRota Analysis
AI-GeneratedVersions 2.13.0 to 2.14.0 of PyJWT are vulnerable due to a flaw in the HMACAlgorithm's key preparation process, which fails to properly handle Unicode byte-order marks in public JWKs. This oversight allows attackers to bypass asymmetric-key detection, enabling them to forge authenticated tokens if they possess the public key. Organizations using affected versions of PyJWT should prioritize upgrading to version 2.14.0 to mitigate the risk of token forgery.
Public Exploit Signal
A public exploit, PoC, GitHub repository or Metasploit reference was detected for this CVE.
Note: these links are listed for security research and verification purposes only.
Original NVD Description
PyJWT is a Python implementation of JSON Web Token standards. From 2.13.0 until 2.14.0, HMACAlgorithm.prepare_key in jwt/algorithms.py is affected because raw-JWK detector does not normalize accepted Unicode byte-order marks before checking for JSON. This occurs when a public JWK is prefixed with a UTF-8 BOM and used in a mixed-algorithm verification path. As a result, public JWK bypasses asymmetric-key detection and becomes the HMAC secret. Consequently, an attacker who knows the public key can forge authenticated tokens. This issue is fixed in version 2.14.0.
Related CVEs
Other vulnerabilities affecting the same vendor(s)