CVE-2026-8748 in Crypt::JWTinfo

Summary

by MITRE • 11/25/2026

Crypt::JWT versions before 0.037_1 for Perl compare HMAC signatures and JWE authentication tags in non-constant time.

decode_jwt compares HS256, HS384 and HS512 signatures, and the authentication tag of A128CBC-HS256, A192CBC-HS384 and A256CBC-HS512 encrypted tokens, against the computed value with Perl's eq operator. Its run time depends on the number of matching leading bytes.

An attacker who can submit many candidate tokens and measure the timing precisely enough may recover the expected signature or tag byte by byte and forge a token that verifies.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 11/25/2026

The vulnerability identified in Crypt::JWT versions prior to 0.037_1 represents a critical implementation flaw within the JSON Web Token processing logic, specifically affecting how cryptographic integrity is verified. The core issue stems from the use of Perl's standard equality operator for comparing HMAC signatures and JWE authentication tags against their computed values. This comparison method operates in non-constant time, meaning that the execution duration varies depending on the number of leading bytes that match between the candidate signature provided by an attacker and the expected valid signature generated by the system. In secure cryptographic implementations, comparisons must be performed in constant time to prevent timing side-channel attacks, where subtle variations in processing speed can leak information about secret keys or valid authentication tokens.

From a technical perspective, this flaw impacts both JSON Web Signature (JWS) algorithms using HMAC-based approaches such as HS256, HS384, and HS512, as well as the authenticated encryption modes defined under JWE specifications, specifically A128CBC-HS256, A192CBC-HS384, and A256CBC-HS512. When a token is submitted for verification, the system iterates through each byte of the provided signature or tag, comparing it sequentially to the expected value. If an initial byte does not match, the comparison fails immediately; however, if bytes match, the process continues to subsequent positions. This behavior creates a measurable timing differential that sophisticated attackers can exploit by submitting numerous candidate tokens and precisely measuring response times to deduce valid bytes one at a time.

The operational impact of this vulnerability is severe, as it allows an attacker with network-level access or the ability to submit multiple requests to perform a byte-by-byte recovery of the expected signature or authentication tag. By leveraging statistical analysis of timing data across many attempts, an adversary can reconstruct a fully valid token without possessing the secret signing key used by the application. This effectively bypasses all integrity and authenticity checks enforced by JWT mechanisms, enabling unauthorized access to protected resources, privilege escalation, session hijacking, or complete compromise of the authentication system depending on how tokens are utilized within the specific application architecture.

This vulnerability is classified under CWE-208 as an Observable Timing Discrepancy and aligns with ATT&CK technique T1564.003, which involves Hidden Execution through timing side-channels in software applications. The exploitation of this flaw does not require complex reverse engineering or binary exploitation techniques but relies instead on precise network latency measurement and statistical correlation, making it a low-effort, high-impact attack vector for any system relying heavily on JWTs for authentication or authorization decisions over untrusted networks.

To mitigate this vulnerability, organizations must immediately upgrade Crypt::JWT to version 0.037_1 or later, where the comparison logic has been corrected to use constant-time algorithms that do not leak information through execution time variations. For systems unable to update promptly due to dependency constraints, implementing request rate limiting and adding artificial random delays can reduce the precision of timing measurements available to an attacker, although this is a compensatory control rather than a definitive fix. Additionally, developers should audit other parts of their codebase for similar non-constant-time comparisons involving secrets or cryptographic material to ensure comprehensive protection against side-channel attacks.

Responsible

CPANSec

Reservation

05/16/2026

Disclosure

11/25/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!