pyjwt — security advisory
PyJWT is a Python implementation of JSON Web Token standards. From 2.13.0 until 2.14.0, HMACAlgorithm.from_jwk is affected because PyJWK verification path used the decoded key without applying prepare_key validation. This occurs when a trusted JWK Set contains an oct entry with an empty k value. As a result, an attacker signs an HMAC token with the same zero-length key accepted by PyJWT. Consequently, forged token can carry arbitrary authenticated claims. This issue is fixed in version 2.14.0.
- Products
- pyjwt
- Affected versions
- 2.10.1-2, 2.10.1-3, 2.10.1-3build1, 2.10.1-4, 2.10.1-4ubuntu1, 2.10.1-4ubuntu1.1, 2.12.1-1, 2.13.0-1
- Fixed versions
- 2.10.1-4ubuntu1.2, 2.13.0-1ubuntu1
- CVEs
- CVE-2026-102266
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 17:54 UTC · Revision 1
Source evidence
PyJWT is a Python implementation of JSON Web Token standards. From 2.13.0 until 2.14.0, HMACAlgorithm.from_jwk is affected because PyJWK verification path used the decoded key without applying prepare_key validation. This occurs when a trusted JWK Set contains an oct entry with an empty k value. As a result, an attacker signs an HMAC token with the same zero-length key accepted by PyJWT. Consequently, forged token can carry arbitrary authenticated claims. This issue is fixed in version 2.14.0.
osv:UBUNTU-CVE-2026-102266
pyjwt
Fixed versions: 2.13.0-1ubuntu1
pyjwt
Fixed versions: 2.10.1-4ubuntu1.2
Complete source record
{
"id": "60cbbd11be958557d1b8669eab98f4ede8c0263a1f275e099d774282b7b9bac1",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-102266",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2026-102266",
"summary": "PyJWT is a Python implementation of JSON Web Token standards. From 2.13.0 until 2.14.0, HMACAlgorithm.from_jwk is affected because PyJWK verification path used the decoded key without applying prepare_key validation. This occurs when a trusted JWK Set contains an oct entry with an empty k value. As a result, an attacker signs an HMAC token with the same zero-length key accepted by PyJWT. Consequently, forged token can carry arbitrary authenticated claims. This issue is fixed in version 2.14.0.",
"evidence": "osv:UBUNTU-CVE-2026-102266",
"products": [
{
"name": {
"value": "pyjwt",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2.13.0-1ubuntu1",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": [
{
"value": "2.10.1-4ubuntu1",
"evidence": "/affected/0/versions"
},
{
"value": "2.12.1-1",
"evidence": "/affected/0/versions"
},
{
"value": "2.13.0-1",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "pyjwt",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2.10.1-4ubuntu1.2",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": [
{
"value": "2.10.1-2",
"evidence": "/affected/1/versions"
},
{
"value": "2.10.1-3",
"evidence": "/affected/1/versions"
},
{
"value": "2.10.1-3build1",
"evidence": "/affected/1/versions"
},
{
"value": "2.10.1-4",
"evidence": "/affected/1/versions"
},
{
"value": "2.10.1-4ubuntu1",
"evidence": "/affected/1/versions"
},
{
"value": "2.10.1-4ubuntu1.1",
"evidence": "/affected/1/versions"
}
]
}
],
"severity": "critical",
"structured": {
"id": "UBUNTU-CVE-2026-102266",
"aliases": [
"UBUNTU-CVE-2026-102266"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N"
},
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
},
{
"type": "Ubuntu",
"score": "medium"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2.13.0-1ubuntu1"
}
]
}
],
"package": {
"name": "pyjwt",
"purl": "pkg:deb/ubuntu/pyjwt?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"2.10.1-4ubuntu1",
"2.12.1-1",
"2.13.0-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-102266.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-jwt",
"binary_version": "2.13.0-1ubuntu1"
}
],
"availability": "No subscription required"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2.10.1-4ubuntu1.2"
}
]
}
],
"package": {
"name": "pyjwt",
"purl": "pkg:deb/ubuntu/pyjwt?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"2.10.1-2",
"2.10.1-3",
"2.10.1-3build1",
"2.10.1-4",
"2.10.1-4ubuntu1",
"2.10.1-4ubuntu1.1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-102266.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-jwt",
"binary_version": "2.10.1-4ubuntu1.2"
}
],
"availability": "No subscription required"
}
}
],
"modified": "2026-10-27T11:56:51.343800745Z",
"provider": "osv",
"upstream": [
"CVE-2026-102266"
],
"references": [
"https://ubuntu.com/security/CVE-2026-102266",
"https://www.cve.org/CVERecord?id=CVE-2026-102266",
"https://github.com/jpadilla/pyjwt/security/advisories/GHSA-9j54-fg26-wv3r",
"https://github.com/jpadilla/pyjwt/commit/f91ed44dd65baaf457f4b3353ed35e98a753934c",
"https://github.com/jpadilla/pyjwt/releases/tag/2.14.0",
"https://ubuntu.com/security/notices/USN-8916-2",
"https://ubuntu.com/security/notices/USN-8916-1"
]
},
"related_cves": [
{
"value": "CVE-2026-102266",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/1/score"
},
"source_id": "core-osv",
"document_id": 461466,
"published_at": "2026-09-28T21:17:00+00:00"
}