Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-102271— PyJWT: Public keys in DER form are accepted as HMAC secrets, bypassing the CVE-2022-29217 guard

Quick assessment

Affected
jpadilla pyjwt
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

PyJWT 是 JSON Web Token 标准的一种 Python 实现。在 2.4.0 至 2.14.0 版本中,PyJWT 的 方法存在安全漏洞,其根本原因在于:不对称密钥保护机制依赖于文本标记(textual markers),而这些标记在 DER 编码中并不存在。 当应用程序同时混合使用 HMAC 和不对称算法,并将 DER 格式的公钥作为共享验证密钥提供时,便会触发此问题。结果是,PyJWT 会将公钥的 DER 字节直接用作 HMAC 的密钥(secret)。因此,任何知晓该公钥的攻击者均可伪造经过

CVSS 7.4 · High

Possible ATT&CK Techniques 1 AI

T1556.008 · Network Provider DLL
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-102271

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
PyJWT: Public keys in DER form are accepted as HMAC secrets, bypassing the CVE-2022-29217 guard
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
密码学签名的验证不恰当
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
jpadilla pyjwt >= 2.4.0, < 2.14.0 -

II. Public POCs for CVE-2026-102271

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-102271

请登录查看更多情报信息。

Other References for CVE-2026-102271 (3)

Same Patch Batch · jpadilla · 2026-09-28 · 13 CVEs total

CVE-2026-102268 9.1 CRITICAL PyJWT: Asymmetric-PEM detection bypass: whitespace/line-ending-mutated public keys skip th
CVE-2026-102266 7.4 HIGH PyJWK accepts empty HMAC keys, bypassing PyJWT's empty-key validation
CVE-2026-102267 7.4 HIGH PyJWT: PyJWKClient follows redirects when fetching JWKS
CVE-2026-102272 7.4 HIGH PyJWT BOM Bypass
CVE-2026-102273 7.4 HIGH PyJWT accepts public JWK containers as HMAC secrets
CVE-2026-102275 6.5 MEDIUM PyJWT accepts inconsistent OKP x/d JWKs, causing public/private key identity confusion
CVE-2026-102274 5.9 MEDIUM PyJWT: Malformed RSA JWK aborts parsing of an entire JWK Set
CVE-2026-101918 5.3 MEDIUM PyJWT: Unauthenticated RecursionError DoS in pre-verification payload parse (PyJWKClient.g
CVE-2026-101917 5.3 MEDIUM PyJWT: PyJWKClient still amplifies unauthenticated JWKS fetches on unknown kid values (inc
CVE-2026-102265 5.3 MEDIUM PyJWT: Uncaught RecursionError in jwt.decode() on deeply nested token header
CVE-2026-102269 4.8 MEDIUM PyJWT: Non-canonical signature segments enable raw-token revocation bypass
CVE-2026-102270 4.4 MEDIUM PyJWT: ReDoS vulnerability when calling the `is_pem_format` function.

IV. Related Vulnerabilities

V. Comments for CVE-2026-102271

No comments yet


Leave a comment