SB20260917213 - Multiple vulnerabilities in pyjwt



SB20260917213 - Multiple vulnerabilities in pyjwt

Published: September 17, 2026 Updated: November 3, 2026

Security Bulletin ID SB20260917213
CSH Severity
High
Patch available
YES
Number of vulnerabilities 14
Exploitation vector Remote access
Highest impact Data manipulation

Breakdown by Severity

High 7% Medium 86% Low 7%
  • Low
  • Medium
  • High
  • Critical

Description

This security bulletin contains information about 14 vulnerabilities.


1) Incorrect Behavior Order: Validate Before Canonicalize (CVE-ID: CVE-2026-102269)

CWE-ID: CWE-180 - Incorrect Behavior Order: Validate Before Canonicalize

CVSSv4: 6.3 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to bypass token revocation controls.

The vulnerability exists due to incorrect behavior order: validate before canonicalize in compact JWS signature-segment decoding when processing a compact JWS with a non-canonical signature segment. A remote attacker can append non-Base64URL characters to a valid token's signature segment to bypass token revocation controls.

Exploitation requires an application to use the raw serialized token as the identity for revocation, replay, rate-limit, or cache state.


2) Uncontrolled Recursion (CVE-ID: CVE-2026-102265)

CWE-ID: CWE-674 - Uncontrolled Recursion

CVSSv4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to uncontrolled recursion in the PyJWS._load() header JSON parsing path when processing a compact token with a deeply nested JSON header. A remote attacker can send an unsigned crafted token to cause a denial of service.

The header is parsed before signature verification, and the resulting exception can bypass applications' normal PyJWT error handling.


3) Improper Verification of Cryptographic Signature (CVE-ID: CVE-2026-102266)

CWE-ID: CWE-347 - Improper Verification of Cryptographic Signature

CVSSv4: 9.1 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to bypass authentication.

The vulnerability exists due to improper verification of cryptographic signatures in PyJWK HMAC key verification when verifying HS256 tokens using an empty oct JWK. A remote attacker can generate a forged HS256 JWT signed with the zero-length HMAC key to bypass authentication.

The application must already load an empty symmetric oct JWK, and minimum HMAC key-length enforcement must be disabled.


4) Improper Verification of Cryptographic Signature (CVE-ID: CVE-2026-102271)

CWE-ID: CWE-347 - Improper Verification of Cryptographic Signature

CVSSv4: 9.1 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to forge authentication tokens with arbitrary claims.

The vulnerability exists due to improper verification of cryptographic signatures in HMACAlgorithm.prepare_key when verifying tokens with DER-form asymmetric public keys while HMAC and asymmetric algorithms are enabled. A remote attacker can submit a forged HMAC-signed token to forge authentication tokens with arbitrary claims.

The issue does not affect PyJWK or PyJWKClient verification paths.


5) Improper Verification of Cryptographic Signature (CVE-ID: CVE-2026-102268)

CWE-ID: CWE-347 - Improper Verification of Cryptographic Signature

CVSSv4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to forge arbitrary-claim tokens.

The vulnerability exists due to improper verification of cryptographic signatures in HMACAlgorithm.prepare_key and is_pem_format when processing a loader-accepted PEM public key that is not recognized as PEM under a mixed algorithm allow-list. A remote attacker can sign an HS256 token using the public key as an HMAC secret to forge arbitrary-claim tokens.

Exploitation requires knowledge of the public verification key, cryptography to be installed, and use of the raw PEM non-PyJWK verification path.


6) Server-Side Request Forgery (SSRF) (CVE-ID: CVE-2026-102267)

CWE-ID: CWE-918 - Server-Side Request Forgery (SSRF)

CVSSv4: 9.1 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to disclose sensitive request headers and cause forged JWT acceptance.

The vulnerability exists due to improper validation of redirect destinations in PyJWKClient when fetching JWKS from an attacker-influenced configured endpoint. A remote attacker can cause the endpoint to return a redirect to a different host to disclose sensitive request headers and cause forged JWT acceptance.

A token kid alone does not trigger the issue.


7) Improper Verification of Cryptographic Signature (CVE-ID: CVE-2026-102273)

CWE-ID: CWE-347 - Improper Verification of Cryptographic Signature

CVSSv4: 9.1 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to forge JWT claims.

The vulnerability exists due to improper verification of cryptographic signatures in PyJWT's HMAC key handling when verifying tokens with a public JWK container supplied as an HMAC key. A remote attacker can use known public key material to create forged HS256, HS384, or HS512 tokens to forge JWT claims.

Exploitation requires an application to allow both symmetric and asymmetric algorithms in the same verification path and use raw public JWK or JWKS JSON as the HMAC key.


8) Improper Verification of Cryptographic Signature (CVE-ID: N/A)

CWE-ID: CWE-347 - Improper Verification of Cryptographic Signature

CVSSv4: 9.1 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to forge authentication tokens with arbitrary claims.

The vulnerability exists due to improper verification of cryptographic signatures in HMACAlgorithm.from_jwk when resolving JWKs for HMAC signature verification. A remote attacker can submit a forged bearer token signed with an empty HMAC key to forge authentication tokens with arbitrary claims.

The issue is reachable when a trusted JWKS contains an oct entry whose k value is empty.


9) Improper handling of exceptional conditions (CVE-ID: N/A)

CWE-ID: CWE-755 - Improper Handling of Exceptional Conditions

CVSSv4: 8.2 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to improper handling of exceptional conditions in PyJWKSet parsing when parsing a JWK Set containing a malformed RSA JWK. A remote attacker can supply a JWK Set containing a malformed RSA key to cause a denial of service.


10) Modification of assumed-immutable data (CVE-ID: N/A)

CWE-ID: CWE-471 - Modification of Assumed-Immutable Data

CVSSv4: 8.3 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to bypass claim verification.

The vulnerability exists due to modification of assumed-immutable data in PyJWT._merge_options() when reusing a mutable options dictionary across token decoding calls with different verification settings. A remote attacker can cause an application to accept a signed expired token or a token with incorrect registered claims as valid to bypass claim verification.

Exploitation requires the application to first decode a token with signature verification disabled and then reuse the same options dictionary after enabling signature verification.


11) Modification of assumed-immutable data (CVE-ID: CVE-2026-103001)

CWE-ID: CWE-471 - Modification of Assumed-Immutable Data

CVSSv4: 8.3 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to bypass claim verification.

The vulnerability exists due to modification of assumed-immutable data in PyJWT._merge_options() when reusing a mutable options dictionary across decode() or decode_complete() calls with different verification settings. A remote attacker can cause an application to accept a signed token with expired or mismatched registered claims as valid to bypass claim verification.

Signature verification is unaffected; exploitation requires reuse of the same options dictionary after a call with signature verification disabled.


12) Inefficient regular expression complexity (CVE-ID: CVE-2026-102270)

CWE-ID: CWE-1333 - Inefficient Regular Expression Complexity

CVSSv4: 5.9 [CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]


The vulnerability allows a remote privileged user to cause a denial of service through excessive CPU consumption.

The vulnerability exists due to inefficient regular expression complexity in PyJWT's is_pem_format function when processing attacker-controlled key or certificate bytes during key preparation. A remote privileged user can supply malformed PEM-like input containing repeated -----BEGIN CERTIFICATE----- lines without a matching end marker to trigger repeated regular expression rescans with quadratic runtime and exhaust CPU resources.


13) Improper Verification of Cryptographic Signature (CVE-ID: CVE-2026-102272)

CWE-ID: CWE-347 - Improper Verification of Cryptographic Signature

CVSSv4: 9.1 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to bypass authentication and authorization by forging JWTs containing arbitrary claims.

The vulnerability exists due to improper verification of cryptographic signatures in PyJWT's HMACAlgorithm.prepare_key() function in jwt/algorithms.py when processing BOM-prefixed RSA public JWK bytes. The bytes.lstrip() call removes only ASCII whitespace, allowing a UTF-8 byte order mark to bypass the JSON-prefix check and cause public key bytes to be accepted as an HMAC secret. A remote attacker can sign and submit an HS256 JWT using the verifier's known BOM-prefixed public JWK bytes as the secret to have arbitrary claims accepted and bypass authentication and authorization.

Exploitation requires the verifier to allow both an asymmetric algorithm and an HMAC algorithm.


14) Allocation of Resources Without Limits or Throttling (CVE-ID: CVE-2026-101917)

CWE-ID: CWE-770 - Allocation of Resources Without Limits or Throttling

CVSSv4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to cause a denial of service through excessive outbound JWKS requests and repeated parsing work.

The vulnerability exists due to resource allocation without throttling in PyJWT's PyJWKClient when processing unverified token headers containing unknown key identifiers. A remote attacker can submit tokens with unknown kid values to force repeated JWKS fetches, bypassing an otherwise valid cache and consuming server resources to cause a denial of service.


Remediation

Install update from vendor's website.

References