Fedora Account System
Red Hat Associate
Red Hat Customer
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.