CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-102275

CVE-2026-102275: Public/Private Key Identity Confusion in PyJWT OKP JWK Processing

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 6, 2026·6 min read·84 visits

Executive Summary (TL;DR)

PyJWT fails to verify that the public and private parameters of an imported OKP (Ed25519/Ed448) JWK belong to the same key pair. This allows attackers to forge a hybrid key containing a victim's public key and their own private key, bypassing cryptographic token bindings such as DPoP.

CVE-2026-102275 (GHSA-x33g-cr3x-6449) is a public/private key identity confusion vulnerability in PyJWT versions 2.1.0 through 2.14.0. When importing Octet Key Pair (OKP) JSON Web Keys (JWKs) representing Ed25519 or Ed448 curves, PyJWT fails to verify that the public parameter 'x' matches the private parameter 'd'. An attacker can construct a hybrid JWK combining a victim's public key with the attacker's private key. In protocols like DPoP that bind sessions via public key thumbprints, this allows the attacker to authenticate as the victim while signing proofs with their own private key, fully bypassing sender-constrained security guarantees.

Vulnerability Overview

The pyjwt library provides cryptographic signing and verification operations for JSON Web Tokens (JWT) and JSON Web Signatures (JWS) in Python environments. To process JSON Web Keys (JWKs), the library implements parsing functions to map JSON data to cryptographic key objects using the Python standard cryptography library. Under RFC 8037, Octet Key Pairs (OKP) are used for Ed25519 and Ed448 signatures, presenting a specific attack surface when untrusted clients present keys directly to the server.

This vulnerability belongs to the cryptographic identity confusion bug class (specifically CWE-345). It affects the deserialization phase of OKP JWK structures. When an application imports a JWK containing both public and private key parameters, pyjwt fails to mathematically validate the relationship between the two parameters. This flaw occurs within the algorithm-specific JWK parser, which assumes the underlying cryptographic engine validates key consistency implicitly.

In identity-bound authentication schemes such as Demonstrating Proof-of-Possession (DPoP, RFC 9449), the authentication framework extracts the client's identity using the JWK's public components. If the application processes client-supplied keys without validation, this implementation flaw allows an unauthorized entity to bypass cryptographic guarantees. An attacker can construct a hybrid key that maps to a legitimate user's identity but is cryptographically controlled by the attacker.

Root Cause Analysis

The root cause of CVE-2026-102275 resides in jwt/algorithms.py inside the OKPAlgorithm.from_jwk deserialization method. RFC 8037 defines OKP JWK payloads using three main parameters: the curve identifier (crv), the public key coordinate (x), and the optional private key scalar (d). Standard security requirements demand that if both x and d are supplied in a single JWK object, they must represent a mathematically coherent public/private key pair.

In affected versions of PyJWT, the algorithm checks for the presence of the private key parameter d. If d is absent, the parser instantiates a public key object strictly using the decoded bytes of x. If d is present, the parser bypasses the x parameter entirely and directly passes the bytes of d to from_private_bytes(). The library instantiates a private key object and immediately returns it to the calling application without verifying the relationship between x and d.

Because the Python cryptography library's from_private_bytes() function does not require or accept the associated public key bytes to initialize an OKP private key, the logic allows a severe discrepancy. The instantiated private key contains its own mathematically derived public key. However, the outer JWK object retains the mismatched public coordinate x specified by the attacker. Applications that rely on the parsed JWK for thumbprint-based identity binding but use the returned key object for signature verification are left vulnerable to identity confusion.

Code-Level Analysis and Patch Review

In vulnerable versions of PyJWT (2.1.0 to 2.14.0), the OKP JWK import routine executes the following path:

# Vulnerable Implementation in jwt/algorithms.py
x = base64url_decode(obj.get("x"))
if not obj.get("d"):
    if curve == "Ed25519":
        return Ed25519PublicKey.from_public_bytes(x)
    return Ed448PublicKey.from_public_bytes(x)
 
d = base64url_decode(obj.get("d"))
if curve == "Ed25519":
    # Vulnerable: Instantiates private key from d without validating x
    return Ed25519PrivateKey.from_private_bytes(d)
return Ed448PrivateKey.from_private_bytes(d)

The security patch applied in commit 3cd9ceec33ced359decbad75b413ad668ae6332c introduces strict cryptographic verification of the key pair before returning the parsed key:

# Patched Implementation in jwt/algorithms.py
            d = base64url_decode(obj.get("d"))
            private_key: Ed25519PrivateKey | Ed448PrivateKey
            if curve == "Ed25519":
                private_key = Ed25519PrivateKey.from_private_bytes(d)
            else:
                private_key = Ed448PrivateKey.from_private_bytes(d)
            
            # Verification Step: Derive the public key from the private key
            # and assert byte-level equality with the declared public parameter 'x'
            if (
                private_key.public_key().public_bytes(
                    encoding=Encoding.Raw, format=PublicFormat.Raw
                )
                != x
            ):
                raise InvalidKeyError("Public key does not match private key")
            return private_key

This fix is highly effective. By extracting the public key bytes directly from the newly initialized private key using private_key.public_key().public_bytes(...) and running a constant-time comparison against the user-supplied x, the parser guarantees that any discrepancy immediately raises an InvalidKeyError. This blocks hybrid key configurations before they can reach signature verification engines.

Exploitation Methodology in DPoP Scenarios

The primary threat vector for CVE-2026-102275 involves OAuth 2.0 frameworks implementing Demonstrating Proof-of-Possession (DPoP) under RFC 9449. DPoP prevents token theft by binding the access token to the client's private key. The client includes a DPoP HTTP header containing a JWS. The JWS header contains a jwk element representing the client's public key, and the server validates the signature against this public key.

An attacker who intercepts a valid access token bound to a victim's public key x_victim cannot normally use it because they lack the corresponding private key. To exploit this vulnerability, the attacker generates their own key pair (x_attacker, d_attacker) and crafts a malicious hybrid JWK. The attacker sets the public parameter `

Impact Assessment & Threat Context

The concrete security impact of CVE-2026-102275 is an authentication and sender-constraint bypass on services implementing Ed25519/Ed448 tokens. An attacker can hijack existing sessions, impersonate legitimate clients, and perform unauthorized API operations. The attack requires no prior privileges or user interaction, assuming the attacker has obtained a target token and has network access to the target API.

The CVSS v3.1 score is evaluated at 6.5 (Medium) with the vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N. The High Attack Complexity reflects the fact that an exploit requires the target system to accept private key parameters within client-supplied headers. Although standard implementations of DPoP explicitly reject private parameters, many API gateways and custom resource servers do not perform this check, parsing the JWK structurally without filtering.

EPSS scores show a low probability of exploitation in the wild (0.00137), primarily because the vulnerability relies on the intersection of OKP algorithms and loose input validation policies. However, inside enterprise architectures that rely heavily on decentralized JWT validation and trust-on-first-use models, this flaw constitutes a silent, critical security bypass.

Mitigation and Defensive Implementation

The definitive remediation is upgrading the PyJWT installation to version 2.15.0 or later, which enforces key consistency out-of-the-box. If upgrading PyJWT is not immediately feasible due to legacy dependency constraints, applications must implement input-filtering middleware to inspect incoming JWK structures.

According to RFC 9449, clients must never transmit private key parameters within public headers. Implementing an explicit schema-validation layer that inspects client-provided JWKs for the presence of the private key parameter d mitigates this attack vector at the application boundary. If d is detected in a client-supplied token or header, the transaction must be blocked immediately.

# Defensive Validation Middleware
def enforce_public_jwk_only(jwk_payload: dict) -> None:
    forbidden_private_keys = {"d", "p", "q", "dp", "dq", "qi"}
    if any(param in jwk_payload for param in forbidden_private_keys):
        raise ValueError("Security Exception: Private key components detected in client-supplied JWK.")

Additionally, applications should restrict the supported signature algorithms (algorithms parameter in jwt.decode()) to the absolute minimum. If your environment does not strictly require Ed25519 or Ed448, omitting 'EdDSA' from the allowed algorithms list fully neutralizes the attack surface.

Official Patches

jpadillaFix commit implementing public key comparison during OKP JWK load

Fix Analysis (1)

Technical Appendix

CVSS Score
6.5/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N
EPSS Probability
0.14%
Top 97% most exploited

Affected Systems

PyJWT

Affected Versions Detail

Product
Affected Versions
Fixed Version
pyjwt
jpadilla
>= 2.1.0, < 2.15.02.15.0
AttributeDetail
Vulnerability IDCVE-2026-102275
CWE IDCWE-345 (Insufficient Verification of Data Authenticity)
Attack VectorNetwork (Unauthenticated)
CVSS v3.1 Score6.5 (Medium)
Exploit StatusProof of Concept (PoC) available
CISA KEV StatusNot Listed
Primary ImpactAuthentication Bypass / Security Token Hijacking

MITRE ATT&CK Mapping

T1556Modify Authentication Process
Credential Access
T1606.001Use Alternate Authentication Material: Web Cookies/Tokens
Defense Evasion
CWE-345
Insufficient Verification of Data Authenticity

The software does not sufficiently verify the authenticity of data, allowing an attacker to supply modified or forged keys that pass validation under specific circumstances.

Known Exploits & Detection

GitHub Security AdvisoryAdvisory text containing detailed information about the vulnerability mechanics and fix.

Vulnerability Timeline

OKP (Ed25519/Ed448) JWK import support introduced in PyJWT version 2.1.0.
2021-05-01
Security patch authored by José Padilla to address inconsistent OKP private keys (Commit 3cd9ceec).
2026-09-12
GitHub Security Advisory GHSA-x33g-cr3x-6449 and CVE-2026-102275 published.
2026-09-28
PyJWT version 2.15.0 officially released containing the security fix.
2026-09-28

References & Sources

  • [1]GitHub Security Advisory GHSA-x33g-cr3x-6449
  • [2]Fix Commit in GitHub Repository
  • [3]PyJWT Release 2.15.0
  • [4]NVD - CVE-2026-102275
  • [5]CVE Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•22 minutes ago•CVE-2026-105803
8.6

CVE-2026-105803: Arbitrary Command Execution via .lfsconfig Parsing in Git LFS

CVE-2026-105803 (GHSA-x72p-hmqp-46hw) is a high-severity arbitrary command execution vulnerability in Git Large File Storage (Git LFS) affecting versions from v1.3.0 prior to v3.8.1. The flaw stems from the combination of an unanchored regular expression in custom transfer adapter initialization (CWE-777) and insufficient syntactic validation during .lfsconfig key filtering (CWE-1286). An attacker can craft a repository containing a malicious .lfsconfig file that bypasses safe-key filtering restrictions and registers an arbitrary binary as a custom transfer adapter, leading to remote code execution when a victim clones or fetches from the repository.

Alon Barad
Alon Barad
1 views•10 min read
•about 1 hour ago•CVE-2026-77367
9.4

CVE-2026-77367: Unauthenticated SQL Injection in Daptin Entity Listing Endpoints

An unauthenticated SQL injection vulnerability exists in Daptin prior to version 0.12.30. The generic entity listing handler fails to validate user-supplied sort parameters against the table schema before passing them to the goqu SQL query builder, enabling remote attackers to break out of SQL identifier quoting and execute arbitrary SQL subqueries.

Alon Barad
Alon Barad
4 views•9 min read
•about 2 hours ago•CVE-2026-77369
9.6

CVE-2026-77369: Broken Access Control in Daptin YJS Collaboration Endpoint

CVE-2026-77369 is a broken access control and Insecure Direct Object Reference (IDOR) vulnerability in Daptin, an open-source headless CMS. Affected versions from 0.11.4 through 0.12.29 expose a generic YJS real-time collaboration WebSocket endpoint (`GET /yjs/:documentName`) that verifies user authentication but fails to enforce row-level authorization when supplied with a canonical database room identifier (`{typename}.{referenceId}.{columnName}`). This allows any low-privileged authenticated user to read or modify restricted database columns of type `file.*` across all entities.

Alon Barad
Alon Barad
2 views•9 min read
•about 3 hours ago•CVE-2026-77376
6.1

CVE-2026-77376: Open Redirect in Bolt CMS LoginFormAuthenticator

CVE-2026-77376 is an open redirect vulnerability (CWE-601) in the core framework of Bolt CMS prior to version 6.1.4. The vulnerability resides within the LoginFormAuthenticator class, which processes post-authentication redirection for both successful and failed login attempts. Due to a lack of destination validation, the application accepts untrusted target paths from user sessions and directly reflects unvalidated HTTP Referer headers into HTTP Location response headers. Attackers can exploit this behavior to redirect users to arbitrary external domains after interacting with the Bolt login endpoint, facilitating credential harvesting and phishing attacks.

Amit Schendel
Amit Schendel
3 views•9 min read
•about 4 hours ago•CVE-2026-77377
5.2

CVE-2026-77377: Authenticated Server-Side Request Forgery in Bolt CMS Backend Asynchronous Endpoints

Bolt CMS (bolt/core) versions prior to 6.1.4 contain a Server-Side Request Forgery (SSRF) vulnerability in the authenticated URL-upload (/async/upload-url) and media embed (/async/embed) endpoints. Backend users with file upload or media embedding privileges can supply arbitrary URLs that the application fetches without destination IP validation. This allows authenticated attackers to force the server to initiate HTTP requests to loopback interfaces, RFC 1918 private networks, and cloud instance metadata services.

Amit Schendel
Amit Schendel
4 views•10 min read
•about 5 hours ago•CVE-2026-77379
5.3

CVE-2026-77379: Information Disclosure in Bolt CMS Public Relation API

Bolt CMS prior to version 6.1.4 contains an information disclosure vulnerability in its public Relation API endpoints. The Doctrine ORM query extension (ContentExtension) fails to filter out unpublished, draft, or viewless content when querying the Relation entity. Because the Relation resource is configured with public read access (PUBLIC_ACCESS) via API Platform REST and GraphQL endpoints, unauthenticated remote attackers can enumerate relationship graphs, entity identifiers, and metadata associated with private content.

Alon Barad
Alon Barad
3 views•9 min read