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.
Published: 2026-09-28
Score: 7.4 High
EPSS: < 1% Very Low
KEV: No
Impact: Impersonation via forged JWTs
Action: Immediate Patch
AI Analysis

Impact

The vulnerability is a CWE-347 flaw that allows a JSON Web Token forgery attack because PyJWT fails to normalize Unicode byte‑order marks in raw‑JWK detectors. When a public JWK is prefixed with a UTF‑8 BOM and used in a mixed‑algorithm verification path, the library treats the key as an HMAC secret, allowing an attacker who knows the public key to forge tokens. This flaw permits unauthenticated token creation, providing attackers with the ability to impersonate users or elevate privileges in applications that rely on JWT validation.

Affected Systems

The issue affects pyjwt releases 2.13.0 through 2.14.0. The library’s HMACAlgorithm.prepare_key function is vulnerable until version 2.14.0, where the fix normalizes BOM characters. Systems using PyJWT to verify signed tokens and that supply public JWKs should ensure they are running a patched version.

Risk and Exploitability

The vulnerability carries a CVSS score of 7.4 and is not listed in the CISA KEV database. An attacker must know the public JWK and be able to supply it to a verification path that mixes algorithms; the lack of an available EPSS score makes it unclear how frequently it is exploited. This is a CWE-347 flaw, and the ability to forge valid authentication tokens represents a high‑impact attack vector, making the flaw a serious concern for applications that trust JWTs from external providers.

Generated by OpenCVE AI on September 28, 2026 at 22:55 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade PyJWT to version 2.14.0 or later to apply the BOM normalization fix, which addresses the CWE‑347 vulnerability.
  • If upgrading is not yet possible, pre‑validate public JWK inputs to strip any leading BOM characters before passing them to jwt.decode, mitigating the CWE‑347 flaw.
  • Review and rotate any tokens issued prior to the fix, and monitor authentication logs for anomalous claims that may indicate forged tokens.

Generated by OpenCVE AI on September 28, 2026 at 22:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-r6x4-923q-g947 PyJWT BOM Bypass
History

Tue, 06 Oct 2026 18:45:00 +0000

Type Values Removed Values Added
First Time appeared Pyjwt Project
Pyjwt Project pyjwt
CPEs cpe:2.3:a:pyjwt_project:pyjwt:2.13.0:*:*:*:*:*:*:*
Vendors & Products Pyjwt Project
Pyjwt Project pyjwt

Tue, 29 Sep 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 29 Sep 2026 13:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Mon, 28 Sep 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Jpadilla
Jpadilla pyjwt
Vendors & Products Jpadilla
Jpadilla pyjwt

Mon, 28 Sep 2026 21:00:00 +0000

Type Values Removed Values Added
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.
Title PyJWT BOM Bypass
Weaknesses CWE-347
References
Metrics cvssV3_1

{'score': 7.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N'}


Subscriptions

Jpadilla Pyjwt
Pyjwt Project Pyjwt
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-29T14:45:44.138Z

Reserved: 2026-09-28T20:11:16.658Z

Link: CVE-2026-102272

cve-icon Vulnrichment

Updated: 2026-09-29T14:45:22.047Z

cve-icon NVD

Status : Analyzed

Published: 2026-09-28T21:17:15.280

Modified: 2026-10-06T18:34:24.710

Link: CVE-2026-102272

cve-icon Redhat

Severity : Important

Publid Date: 2026-09-28T20:36:31Z

Links: CVE-2026-102272 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-28T23:00:07Z

Weaknesses
  • CWE-347

    Improper Verification of Cryptographic Signature