REDHAT-BUG-2526729: Medium severity jwcrypto vulnerability

Published Sep 1, 2026
·
Updated

A flaw was found in jwcrypto. When verifying a General JSON Serialization JWS using a JWKSet, the library does not correctly apply the current signature kid header when selecting the verification key. The root cause is located in jwcrypto/jws.py, where the code incorrectly evaluates the joseheader as a dictionary when it is actually a list for General JSON JWS objects. Consequently, the library may iterate through every key in the supplied JWKSet and accept a signature made by a different key than the one identified by the kid header.

An attacker who possesses a valid signing key within the application's trusted JWKSet can exploit this flaw to bypass kid-based authorization bindings. This allows the attacker to perform actions such as impersonating other tenants, accessing unauthorized data, or escalating privileges in applications that rely on the kid claim for security decisions.

Affected Software

1 affected component
jwcrypto

Event History

Sep 1, 2026
Data Sourced
via Red Hat·10:33 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which applications are realistically exposed to this flaw?

Applications using jwcrypto to verify General JSON Serialization JWS objects against a JWKSet are exposed if they rely on the signature kid header to bind a token or signature to a particular tenant, identity, authorization scope, or key-specific privilege.

2

What does an attacker need to exploit it?

The attacker needs possession of a valid signing key that is already present in the application's trusted JWKSet. They can then create a signature with that key while presenting a kid value associated with a different key, potentially bypassing kid-based authorization bindings.

3

Are deployments that do not make security decisions based on kid affected in the same way?

The flawed key-selection behavior may still occur when verifying General JSON JWS with a JWKSet, but the described authorization impact depends on the application using kid as a security boundary. The reported risks, including tenant impersonation, unauthorized data access, and privilege escalation, arise when kid determines authorization-relevant identity or scope.

4

How can teams determine whether their application is affected?

Review whether the application uses jwcrypto's General JSON Serialization JWS verification with a JWKSet and whether it trusts the kid header for tenant selection, identity mapping, access control, or other authorization decisions. Also determine whether multiple trusted signing keys exist in that JWKSet, since the issue can cause verification to succeed with a key other than the one identified by kid.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203