REDHAT-BUG-2456187: Low severity pypi/jwcrypto vulnerability
JWCrypto implements JWK, JWS, and JWE specifications using python-cryptography. Prior to 1.5.7, an unauthenticated attacker can exhaust server memory by sending crafted JWE tokens with ZIP compression. The existing patch for CVE-2024-28102 limits input token size to 250KB but does not validate the decompressed output size. An unauthenticated attacker can cause memory exhaustion on memory-constrained systems. A token under the 250KB input limit can decompress to approximately 100MB. This vulnerability is fixed in 1.5.7.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
JWCryptoto a version that resolves this vulnerability.Fixed in 1.5.7 - Compensating control
Use the existing patch for CVE-2024-28102 to limit unauthenticated input JWE token size to 250KB (note: this patch alone does not validate decompressed output size).
Event History
Frequently Asked Questions
What does an attacker need to exploit this issue?
An attacker only needs to send a crafted JWE token using ZIP compression. No authentication is required.
Are systems with the earlier 250KB token-size limit still affected?
Yes. The 250KB limit restricts compressed input size but does not limit decompressed output; a token below that limit can expand to approximately 100MB in memory.
Which deployments are most at risk?
Memory-constrained systems processing attacker-supplied JWE tokens are most exposed, because repeated crafted tokens can exhaust available server memory.
What version fixes the vulnerability?
The issue is fixed in jwcrypto version 1.5.7.