Skip to content
Heist/ feed
Back to feed
HighFix available

pyjwt — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2026-102272

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.

Products
pyjwt
Affected versions
1.0.0-0ubuntu1, 1.3.0-1, 1.3.0-1ubuntu0.1, 1.3.0-1ubuntu0.1+esm1, 1.3.0-1ubuntu0.1+esm2, 1.4.2-1.1, 1.5.3+ds1-1, 1.5.3+ds1-1ubuntu0.1, 1.5.3+ds1-1ubuntu0.1+esm1, 1.5.3+ds1-1ubuntu0.1+esm2, 1.7.0-2, 1.7.1-1, 1.7.1-2ubuntu1, 1.7.1-2ubuntu2, 1.7.1-2ubuntu2.1, 1.7.1-2ubuntu2.1+esm1, 1.7.1-2ubuntu2.1+esm2, 2.1.0-1, 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, 2.3.0-1, 2.3.0-1ubuntu0.1, 2.3.0-1ubuntu0.2, 2.3.0-1ubuntu0.3, 2.3.0-1ubuntu0.4, 2.7.0-1, 2.7.0-1ubuntu0.1, 2.7.0-1ubuntu0.2
Fixed versions
1.3.0-1ubuntu0.1+esm3, 1.5.3+ds1-1ubuntu0.1+esm3, 1.7.1-2ubuntu2.1+esm3, 2.10.1-4ubuntu1.2, 2.13.0-1ubuntu1, 2.3.0-1ubuntu0.5, 2.7.0-1ubuntu0.3
CVEs
CVE-2026-102272
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 17:54 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-102272

core-osv · Original source

Published 28 Sept 2026, 21:17 UTC

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.

osv:UBUNTU-CVE-2026-102272

pyjwt

Fixed versions: 1.3.0-1ubuntu0.1+esm3

pyjwt

Fixed versions: 1.5.3+ds1-1ubuntu0.1+esm3

pyjwt

Fixed versions: 1.7.1-2ubuntu2.1+esm3

pyjwt

Fixed versions: 2.3.0-1ubuntu0.5

pyjwt

Fixed versions: 2.7.0-1ubuntu0.3

pyjwt

Fixed versions: 2.13.0-1ubuntu1

pyjwt

Fixed versions: 2.10.1-4ubuntu1.2

Complete source record
{
  "id": "12fa11c0cce9af49609c4cc3ed303db5693bfccc73eb84382348993280ccaa0a",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-102272",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-102272",
    "summary": "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.",
    "evidence": "osv:UBUNTU-CVE-2026-102272",
    "products": [
      {
        "name": {
          "value": "pyjwt",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.3.0-1ubuntu0.1+esm3",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.0.0-0ubuntu1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.3.0-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.3.0-1ubuntu0.1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.3.0-1ubuntu0.1+esm1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.3.0-1ubuntu0.1+esm2",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "pyjwt",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.5.3+ds1-1ubuntu0.1+esm3",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.4.2-1.1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.5.3+ds1-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.5.3+ds1-1ubuntu0.1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.5.3+ds1-1ubuntu0.1+esm1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.5.3+ds1-1ubuntu0.1+esm2",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "pyjwt",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.7.1-2ubuntu2.1+esm3",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.7.0-2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.7.1-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.7.1-2ubuntu1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.7.1-2ubuntu2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.7.1-2ubuntu2.1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.7.1-2ubuntu2.1+esm1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.7.1-2ubuntu2.1+esm2",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "pyjwt",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.3.0-1ubuntu0.5",
            "evidence": "/affected/3/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.7.1-2ubuntu2",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "2.1.0-1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "2.3.0-1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "2.3.0-1ubuntu0.1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "2.3.0-1ubuntu0.2",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "2.3.0-1ubuntu0.3",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "2.3.0-1ubuntu0.4",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "pyjwt",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.7.0-1ubuntu0.3",
            "evidence": "/affected/4/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "2.7.0-1",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "2.7.0-1ubuntu0.1",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "2.7.0-1ubuntu0.2",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "pyjwt",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.13.0-1ubuntu1",
            "evidence": "/affected/5/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "2.10.1-4ubuntu1",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "2.12.1-1",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "2.13.0-1",
            "evidence": "/affected/5/versions"
          }
        ]
      },
      {
        "name": {
          "value": "pyjwt",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.10.1-4ubuntu1.2",
            "evidence": "/affected/6/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "2.10.1-2",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "2.10.1-3",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "2.10.1-3build1",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "2.10.1-4",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "2.10.1-4ubuntu1",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "2.10.1-4ubuntu1.1",
            "evidence": "/affected/6/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "UBUNTU-CVE-2026-102272",
      "aliases": [
        "UBUNTU-CVE-2026-102272"
      ],
      "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": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.3.0-1ubuntu0.1+esm3"
                }
              ]
            }
          ],
          "package": {
            "name": "pyjwt",
            "purl": "pkg:deb/ubuntu/pyjwt?arch=source&distro=esm-infra-legacy%2Fxenial",
            "ecosystem": "Ubuntu:Pro:16.04:LTS"
          },
          "versions": [
            "1.0.0-0ubuntu1",
            "1.3.0-1",
            "1.3.0-1ubuntu0.1",
            "1.3.0-1ubuntu0.1+esm1",
            "1.3.0-1ubuntu0.1+esm2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-102272.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python-jwt",
                "binary_version": "1.3.0-1ubuntu0.1+esm3"
              },
              {
                "binary_name": "python3-jwt",
                "binary_version": "1.3.0-1ubuntu0.1+esm3"
              }
            ],
            "availability": "Available with Ubuntu Pro with Legacy support add-on: https://ubuntu.com/pro"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.5.3+ds1-1ubuntu0.1+esm3"
                }
              ]
            }
          ],
          "package": {
            "name": "pyjwt",
            "purl": "pkg:deb/ubuntu/pyjwt?arch=source&distro=esm-infra%2Fbionic",
            "ecosystem": "Ubuntu:Pro:18.04:LTS"
          },
          "versions": [
            "1.4.2-1.1",
            "1.5.3+ds1-1",
            "1.5.3+ds1-1ubuntu0.1",
            "1.5.3+ds1-1ubuntu0.1+esm1",
            "1.5.3+ds1-1ubuntu0.1+esm2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-102272.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python-jwt",
                "binary_version": "1.5.3+ds1-1ubuntu0.1+esm3"
              },
              {
                "binary_name": "python3-jwt",
                "binary_version": "1.5.3+ds1-1ubuntu0.1+esm3"
              }
            ],
            "availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.7.1-2ubuntu2.1+esm3"
                }
              ]
            }
          ],
          "package": {
            "name": "pyjwt",
            "purl": "pkg:deb/ubuntu/pyjwt?arch=source&distro=esm-infra%2Ffocal",
            "ecosystem": "Ubuntu:Pro:20.04:LTS"
          },
          "versions": [
            "1.7.0-2",
            "1.7.1-1",
            "1.7.1-2ubuntu1",
            "1.7.1-2ubuntu2",
            "1.7.1-2ubuntu2.1",
            "1.7.1-2ubuntu2.1+esm1",
            "1.7.1-2ubuntu2.1+esm2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-102272.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-jwt",
                "binary_version": "1.7.1-2ubuntu2.1+esm3"
              }
            ],
            "availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.3.0-1ubuntu0.5"
                }
              ]
            }
          ],
          "package": {
            "name": "pyjwt",
            "purl": "pkg:deb/ubuntu/pyjwt?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "1.7.1-2ubuntu2",
            "2.1.0-1",
            "2.3.0-1",
            "2.3.0-1ubuntu0.1",
            "2.3.0-1ubuntu0.2",
            "2.3.0-1ubuntu0.3",
            "2.3.0-1ubuntu0.4"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-102272.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-jwt",
                "binary_version": "2.3.0-1ubuntu0.5"
              }
            ],
            "availability": "No subscription required"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.7.0-1ubuntu0.3"
                }
              ]
            }
          ],
          "package": {
            "name": "pyjwt",
            "purl": "pkg:deb/ubuntu/pyjwt?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "2.7.0-1",
            "2.7.0-1ubuntu0.1",
            "2.7.0-1ubuntu0.2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-102272.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-jwt",
                "binary_version": "2.7.0-1ubuntu0.3"
              }
            ],
            "availability": "No subscription required"
          }
        },
        {
          "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-102272.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-102272.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.134433423Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-102272"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-102272",
        "https://www.cve.org/CVERecord?id=CVE-2026-102272",
        "https://github.com/jpadilla/pyjwt/security/advisories/GHSA-r6x4-923q-g947",
        "https://github.com/jpadilla/pyjwt/commit/180783930de91876bc0d601f826a1f2956057291",
        "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-102272",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 461467,
  "published_at": "2026-09-28T21:17:00+00:00"
}