CVE-2026-136795 in Crypt::JWTinfo

Summary

by MITRE • 11/26/2026

Crypt::JWT versions before 0.037_1 for Perl allow memory exhaustion via unbounded inflation of zip DEF payloads.

When a token header sets "zip" to "DEF", decode_jwt inflates the payload with no limit on the output size. A signed token is inflated after its signature verifies. An encrypted token is inflated after decryption, and with RSA-OAEP or ECDH-ES key management anyone who holds the recipient's public key can produce a token that decrypts.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 11/26/2026

The vulnerability identified in Crypt::JWT versions prior to 0.037_1 represents a critical resource exhaustion flaw rooted in the handling of compressed JSON Web Tokens. Specifically, when the header parameter zip is set to DEF, indicating DEFLATE compression, the decode_jwt function proceeds to inflate the payload without implementing any constraints on the maximum output size. This lack of bounds checking allows an attacker to craft malicious tokens containing highly compressible data that expands into massive amounts of memory upon decompression. The flaw exploits the fundamental difference between compressed and uncompressed data sizes, where a small input can result in gigabytes of output if carefully constructed, leading directly to denial of service conditions through memory exhaustion on the target system.

The operational impact is severe because the vulnerability triggers after cryptographic verification has already occurred for signed tokens or decryption for encrypted ones. For JWTs using digital signatures, an attacker must first obtain a valid signature, which typically requires access to signing keys or weak key management practices. However, in scenarios involving RSA-OAEP or ECDH-ES key agreement algorithms, the barrier is significantly lower. In these cases, any party possessing the recipient's public key can generate a token that successfully decrypts on the server side. This means that even without private key access, an attacker can trigger the memory exhaustion vulnerability by sending specially crafted encrypted tokens to services using these specific key management methods. The result is a straightforward denial of service attack where the application consumes all available system memory or hits process limits, causing crashes or unresponsiveness for legitimate users.

From a classification perspective, this issue aligns with CWE-400, which describes Uncontrolled Resource Consumption, and more specifically CWE-770, Allocation of Resources Without Limits or Throttling. The attack vector leverages the decompression step as an amplification mechanism, similar to concepts found in CWE-1321 Improperly Controlled Modification of Object Metamodel Attributes when considering how metadata influences processing behavior. In terms of MITRE ATT&CK mapping, this vulnerability facilitates Denial of Service (T1499) by exhausting system resources and potentially serves as a precursor for further exploitation if the application restarts or behaves unpredictably under memory pressure. The reliance on public keys for RSA-OAEP and ECDH-ES makes it particularly dangerous in open environments where public keys are widely distributed, such as OAuth2 authorization servers or API gateways that accept JWTs from various issuers.

Mitigation strategies must focus on enforcing strict limits during the decompression phase of token processing. Developers should implement a maximum allowed size for inflated payloads before accepting them into application logic. This can be achieved by configuring the underlying DEFLATE library to enforce output buffer limits or by manually tracking the byte count during inflation and aborting if a predefined threshold is exceeded. Additionally, upgrading to Crypt::JWT version 0.037_1 or later resolves this issue as it includes patches that introduce these necessary bounds checks. Organizations relying on JWTs should also audit their use of compression features; where possible, disabling the zip header entirely eliminates the attack surface associated with decompression vulnerabilities altogether. Regular security assessments and static code analysis tools configured to detect unbounded resource allocation patterns can help identify similar issues in custom implementations before they are deployed into production environments.

Responsible

CPANSec

Reservation

11/25/2026

Disclosure

11/26/2026

Moderation

accepted

CPE

ready

EPSS

0.00299

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!