CVE-2026-8748: Crypt::JWT versions before 0.037_1 for Perl compare HMAC signatures and JWE authentication tags in non-constant time
Crypt::JWT versions before 0.0371 for Perl compare HMAC signatures and JWE authentication tags in non-constant time.
decodejwt 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Crypt-JWTto a version that resolves this vulnerability.Fixed in 0.038
Event History
Frequently Asked Questions
Which token algorithms are affected?
The issue affects HMAC signature verification for HS256, HS384, and HS512, plus JWE authentication-tag verification for A128CBC-HS256, A192CBC-HS384, and A256CBC-HS512.
What capabilities does an attacker need to exploit this?
An attacker must be able to submit many candidate tokens and measure verification timing with enough precision. The timing difference depends on how many leading bytes of the supplied signature or authentication tag match the expected value.
What could successful exploitation allow?
An attacker may recover the expected signature or authentication tag one byte at a time and forge a token that passes verification.
Which versions should be remediated?
Crypt::JWT versions before 0.037_1 are affected. Upgrade to 0.037_1 or later.