Skip to content
Heist/ feed
High

PyJWT accepts public JWK containers as HMAC secrets

Type: advisorySource: Official CVE List1 source record

PyJWT is a Python implementation of JSON Web Token standards. From 2.13.0 until 2.14.0, PyJWT HMACAlgorithm.prepare_key is affected because HMAC key guard only recognizes top-level public JWK forms and misses container representations. This occurs when an application allows HMAC and asymmetric algorithms and passes a public JWK container as the raw key. As a result, public asymmetric key material is accepted as the HMAC secret. Consequently, an attacker who knows the public key can forge a token with arbitrary authenticated claims. This issue is fixed in version 2.14.0.

Announced Group revision 1
Original source ↗

CVE-2026-102273

Primary source · Revision 2

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-102273

pyjwt

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "vendor": "jpadilla",
    "product": "pyjwt",
    "versions": [
      {
        "status": "affected",
        "version": ">= 2.13.0, < 2.14.0"
      }
    ]
  }
]
Related CVEs
CVE-2026-102273

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Linked CVE context

These ratings describe the referenced vulnerabilities and products. They are not a severity rating for every application using this dependency.

Event
#62597 · Revision 2
Added to Heist Feed
Publisher date
Read the original announcement