Vulnérabilité dans PyJWT (CVE-2026-102268)
Résumé
Vulnérabilité dans PyJWT (CVE-2026-102268). Des informations confidentielles peuvent être exposées. Exploitable via jwt.decode. Atténuation : mise à jour vers 2.14.0 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Prerequisites (both conditions must hold; both are deployment properties, not attacker-controlled at request time):
- The
jwt.decodeallow-list mixes an HMAC algorithm with an asymmetric one, e.g.algorithms=["ES256", "HS256"](the RFC 8725 footgun the guard exists to backstop). - The verification key is passed as raw PEM text/bytes on the non-
PyJWKpath, in a byte-form thatcryptography's loader accepts but PyJWT'sis_pem_formatregex does not recognize (marker-adjacent whitespace/indentation, CR-only line terminators, or the PEM folded to a single line). Such forms arise naturally from an indented YAML/JSON block, a single-line environment variable or JSON string, or a CR/LF round-trip through config tooling.
The attacker additionally needs the public verification key, which is public by definition, and cryptography must be installed.
The fix for CVE-2022-29217 rejects an asymmetric key handed to an HMAC algorithm, but only when is_pem_format() recognizes the key as PEM. That recognizer accepts strictly fewer byte-forms than the loader that later parses the key, so a PEM the guard misses still loads as a valid public key and is then used as an HMAC secret. This is an incomplete-guard bypass of the CVE-2022-29217 family.
Summary
A PEM public key with marker-adjacent whitespace, CR-only line terminators, or folded to a single line makes PyJWT's is_pem_format() return False while cryptography.load_pem_public_key() accepts the identical bytes. Th…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2026-102268 a été découverte dans PyJWT.
Des attaquants peuvent cibler un point d'entrée spécifique comme jwt.decode à distance pour détourner le produit.
Des informations confidentielles peuvent être exposées. Score CVSS : 9.1/10.
Action : mettez à jour PyJWT vers 2.14.0 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « PyJWT CVE-2026-102268 » sur le site de l'éditeur.
CVE-2026-102268 (PyJWT) — CWE-347 / CVSS v3 9.1
Vecteur d'attaque : distant (réseau) / non authentifié / sans interaction utilisateur
Surface d'attaque : jwt.decode / PyJWK / cryptography / is_pem_format
Correctif : 2.14.0 — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une vulnérabilité (CWE-347) affecte PyJWT. Les attaquants atteignent le code vulnérable via jwt.decode sans authentification.
Consultez l'avis de l'éditeur pour les versions affectées de PyJWT. Surface d'attaque : jwt.decode / PyJWK / cryptography / is_pem_format.
Gravité : Critique (CVSS 9.1/10). Des informations confidentielles peuvent être exposées.
Mettre à jour vers 2.14.0.
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
grep -r 'PyJWT' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
PyJWTを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade PyJWT to 2.14.0ステージング環境で 2.14.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
État des correctifs par distribution
Paquets corrigés publiés par chaque distribution pour cette CVE
- Debian DEBIAN-CVE-2026-102268 pyjwt
- Ubuntu UBUNTU-CVE-2026-102268 pyjwt
Références
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- package pypi.org
- web github.com
- web github.com
- web github.com