REDHAT-BUG-2588664: Medium severity pypi/jwcrypto vulnerability

Published Dec 2, 2026
·
Updated

A flaw was found in python-jwcrypto. The JWK constructor still honours the deprecated generate keyword, and two code paths build a JWK from untrusted data through that constructor: the ECDH-ES epk header processed during JWE decryption, and individual entries imported through JWKSet. An attacker-supplied epk header or JWK Set entry such as {"generate": "oct", "size": ...} makes jwcrypto generate a key of the attacker's chosen type and unbounded size, for JWE before any authentication tag check and without any key material. A crafted 146-byte token was shown to cause roughly 1.1 GB of memory allocation per decryption attempt, and a large RSA size stalls the worker in key generation for minutes, potentially resulting in a denial of service.

Affected Software

1 affected component
pypi/jwcrypto

Event History

Dec 2, 2026
Data Sourced
via Red Hat·12:55 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Does an attacker need valid key material or a successfully authenticated JWE to trigger this issue?

No. The ECDH-ES epk header is processed during JWE decryption before authentication-tag verification, and the described payload requires no key material.

2

Which application flows can be exposed?

Applications are exposed when they decrypt JWE messages using ECDH-ES with attacker-controlled headers, or when they import individual untrusted entries into a JWKSet.

3

What operational impact can a malicious payload cause?

A 146-byte crafted token was shown to allocate approximately 1.1 GB of memory per decryption attempt. Selecting a large RSA size can also keep a worker busy generating a key for minutes, causing denial of service.

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