CVE-2026-102273: PyJWT PyJWT Accepts Public JWK Containers Vulnerability
HIGHCVE-2026-102273 is a HIGH (CVSS 7.4) pyjwt accepts public jwk containers vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting PyJWT libraries in the PyPI ecosystem. The issue involves pyjwt accepts public jwk containers as hmac secrets. Remediation is available by upgrading affected packages to version 2.14.0.
CVE-2026-102273 at a Glance
Security Impact
CVSS: 7.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-102273
To remediate this vulnerability, upgrade all affected PyJWT dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install PyJWT>=2.14.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show PyJWT
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-102273, inspect your installed packages using pip:
pip show PyJWT
Analyze the terminal output to locate any version of PyJWT in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.14.0), your application is affected.
Note: The pip show PyJWT command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In PyJWT, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-102273 Affected PyJWT Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
PyJWT
|
PyPI |
≥ 2.13.0
< 2.14.0
All 1 versions
2.13.0
|
2.14.0
|
References
Frequently Asked Questions
What is CVE-2026-102273?
Which PyJWT versions are affected?
What version fixes CVE-2026-102273?
Is PyJWT affected?
What is the CVSS score of CVE-2026-102273?
What CWE is associated with CVE-2026-102273?
How can I check PyPI dependencies for CVE-2026-102273?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w2cx-738m-mc7w",
"modified" : "2026-09-29T23:16:55Z",
"published" : "2026-09-29T23:16:55Z",
"aliases" : [ "CVE-2026-102273" ],
"summary" : "PyJWT accepts public JWK containers as HMAC secrets",
"details" : "### Summary\n\nPyJWT 2.13.0 contains an incomplete defense against algorithm confusion when\nan application mixes symmetric and asymmetric algorithms in one verification\npath. A public RSA, EC, or OKP JWK can be accepted as an HMAC secret when it\nis wrapped in a JWKS object, nested in an array, or represented in another\ncontainer form that does not expose a top-level `kty` member.\n\n### Impact\n\nAn attacker who knows the public key material can forge HS256/HS384/HS512\ntokens if the application simultaneously:\n\n* allows both HS* and asymmetric algorithms;\n* passes raw public JWK/JWKS JSON as `key=`; and\n* uses that same value as the HMAC secret.\n\nThis can allow forged JWT claims in affected application configurations. The\nissue does not affect applications that keep symmetric and asymmetric\nverification paths separate and follow PyJWT's algorithm-selection guidance.\n\n### Fix status\n\nThe fix is on `master` in commit `801cd12` (`fix: reject public JWK container\nHMAC keys`). `HMACAlgorithm.prepare_key` now rejects public JWK members found in\nobjects, arrays, nested containers, BOM/UTF variants, and recursion-limit\ninputs. It also recognizes escaped JSON member names without treating ordinary\nstring values as JWKs. Ordinary JSON secrets remain accepted byte-for-byte.\n\nThe change was tested with focused regression tests and the full local tox\nmatrix. Available Python 3.9, 3.12, and 3.13 crypto/no-crypto suites, mypy,\npackage metadata, and coverage passed; unavailable interpreters were skipped\nby the project configuration. A fresh independent Astra/max security review\naccepted the final diff with no blocking findings.\n\nThe affected range is `= 2.13.0`. The fix is on the unreleased development\nbranch; the patched version will be recorded when a released 2.x version\ncontaining the fix is available. This advisory is being moved to draft pending\nthat release.\n\n### Reporter credit\n\nCredit: Charles Vosburgh / Trilobyte.\n\n### Original report\n\nThe original report and reproduction package are retained in the private\nadvisory record.\n\n## Maintainer update — 2026-09-11\n\nThe verified fix for this advisory is included in PyJWT 2.14.0, released on 2026-09-11 and available on PyPI. PyJWT 2.14.0 is the first release containing the fix. This advisory is now published with 2.14.0 recorded as the patched version.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "PyJWT"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.13.0"
}, {
"fixed" : "2.14.0"
} ]
} ],
"versions" : [ "2.13.0" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jpadilla/pyjwt/security/advisories/GHSA-w2cx-738m-mc7w"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-102273"
}, {
"type" : "WEB",
"url" : "https://github.com/jpadilla/pyjwt/commit/801cd128528c62d9b23fcd161d1a2e1c17982f95"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jpadilla/pyjwt"
}, {
"type" : "WEB",
"url" : "https://github.com/jpadilla/pyjwt/releases/tag/2.14.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-347" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-29T23:16:55Z",
"nvd_published_at" : "2026-09-28T21:17:15Z"
}
}