PT-2026-102363 · Pypi · Pyjwt
CVSS v3.1
7.4
High
| Vector | AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
Name of the Vulnerable Software and Affected Versions
PyJWT versions 2.4.0 through 2.13.x
Description
The
HMACAlgorithm.prepare key() function is affected because the asymmetric-key guard relies on textual markers that are absent from DER (Distinguished Encoding Rules) encoding. This occurs when an application mixes HMAC and asymmetric algorithms and supplies a DER public key as the shared verification key. Consequently, PyJWT uses the public DER bytes as an HMAC secret, allowing an attacker who knows the public key to forge authenticated HMAC tokens.Recommendations
Update to version 2.14.0.
Exploit
Fix
Improper Verification of Cryptographic Signature
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Pyjwt