CVE-2026-9537 PUBLISHED

Mojo::JWT versions before 1.02 for Perl verify HMAC signatures with a non-constant-time string comparison

Assigner: CPANSec
Reserved: 25.05.2026 Published: 17.07.2026 Updated: 17.07.2026

Mojo::JWT versions before 1.02 for Perl verify HMAC signatures with a non-constant-time string comparison.

The decode() method compares the supplied signature to the recomputed HMAC with Perl's eq operator, which stops at the first differing byte, so the comparison time varies with the number of matching leading bytes.

A caller that decodes attacker supplied tokens leaks the expected signature through this timing variation, which can be aggregated over many requests to recover the signature and forge a token.

Product Status

Vendor JBERGER
Product Mojo::JWT
Versions Default: unaffected
  • affected from 0 to 1.02 (excl.)

Solutions

Upgrade to Mojo-JWT 1.02, which compares signatures with the constant-time Mojo::Util::secure_compare.

References

Problem Types

  • CWE-208 Observable Timing Discrepancy CWE