CVE-2026-102275: PyJWT OKP Key Identity Confusion Vulnerability

pyjwt Updated 06 Oct 2026

Summary

05/10/2026
Yes i
Moderate
6.5

CVE-2026-102275: PyJWT accepts inconsistent OKP x/d JWKs, causing public/private key identity confusion. Affects pyjwt versions >= 2.1.0, < 2.15.0. Fixed in 2.15.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

PyJWT is a Python library that allows developers to encode and decode JSON Web Tokens (JWTs). It supports various algorithms for signing and verifying tokens, making it a popular choice for authentication in web applications. However, a vulnerability has been identified in its handling of OKP (Octet Key Pair) private JWKs, which can lead to security issues if not addressed.

Vulnerability Detail

The vulnerability arises from PyJWT's acceptance of inconsistent OKP private JWKs, where the declared public key 'x' does not correspond to the supplied private key 'd'. This inconsistency allows an attacker to create a JWK that appears valid but uses a different private key for cryptographic operations. As a result, an attacker can exploit this flaw in DPoP (Demonstrating Proof of Possession) integrations, potentially allowing them to use stolen access tokens without possessing the legitimate holder's private key. The issue has existed since the introduction of OKP private-JWK import in PyJWT versions 2.1.0 and 2.2.0, and it has been confirmed in versions up to 2.14.0.

How To Fix

Latest published version: 2.15.1 as of 23 Oct 2026

pip install --upgrade "pyjwt==2.15.1"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.15.0

This is the first release that contains the fix.

pip install --upgrade "pyjwt==2.15.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, ensure that your DPoP implementation rejects any JWKs that contain private key parameters (such as 'd'). This can be done by validating the JWK before passing it to PyJWT for signature verification.

Conclusion

The vulnerability identified as CVE-2026-102275 in PyJWT poses a significant risk due to the acceptance of inconsistent OKP keys. It is crucial for developers using this library to update to version 2.15.0 or later to mitigate this risk. Additionally, implementing workarounds to reject private key parameters can provide an extra layer of security.

See every vulnerability recorded for pyjwt →

Share this vulnerability

FAQ

The vulnerability allows for the acceptance of inconsistent public and private keys in OKP JWKs, leading to potential security breaches.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

An attacker could use a stolen access token without having the legitimate holder's private key, compromising the security of the application.

Yes, the vulnerability has been fixed in PyJWT version 2.15.0. Updating to this version will resolve the issue.

The CVSS score for this vulnerability is 6.5, indicating a moderate level of severity.

Related vulnerabilities

Recent vulnerabilities recorded for pyjwt.

How To Fix

Latest published version: 2.15.1 as of 23 Oct 2026

pip install --upgrade "pyjwt==2.15.1"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.15.0

This is the first release that contains the fix.

pip install --upgrade "pyjwt==2.15.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback