Skip to main content

Mojo::JWT CVE-2026-9537

| EUVDEUVD-2026-45193 MEDIUM
Observable Timing Discrepancy (CWE-208)
2026-07-17 CPANSec GHSA-3rp9-gq85-w2mf
5.3
CVSS 3.1 · Vendor: CPANSec
Share

Severity by source

Vendor (CPANSec) PRIMARY
5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
vuln.today AI
4.8 MEDIUM

AC:H reflects the need for many controlled timing measurements; C:L added because HMAC signature bytes (cryptographic material) are recovered through the oracle.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
SUSE
MEDIUM
qualitative

Primary rating from Vendor (CPANSec).

CVSS VectorVendor: CPANSec

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

Lifecycle Timeline

4
Source Code Evidence Fetched
Jul 20, 2026 - 22:31 vuln.today
Analysis Generated
Jul 20, 2026 - 22:31 vuln.today
CVSS changed
Jul 20, 2026 - 20:22 NVD
5.3 (MEDIUM)
CVE Published
Jul 17, 2026 - 15:29 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

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.

AnalysisAI

Token forgery is possible against any Perl application using Mojo::JWT versions before 1.02 due to a timing side-channel in HMAC signature verification. The decode() method compared the supplied signature against the recomputed HMAC using Perl's native eq operator, which short-circuits on the first differing byte, leaking the expected signature byte-by-byte through measurable response time variation. An attacker with the ability to submit many attacker-controlled tokens to an endpoint that calls decode() can statistically aggregate these timing differences to reconstruct the valid HMAC signature and subsequently forge arbitrary JWT tokens. No public exploit has been identified at time of analysis, and EPSS sits at the 7th percentile, indicating low automated exploitation probability.

Technical ContextAI

Mojo::JWT (CPE: cpe:2.3:a:jberger:mojo::jwt:*:*:*:*:*:*:*:*) is a JWT implementation for the Perl Mojolicious web framework authored by Joel Berger. The root cause is CWE-208 (Observable Timing Discrepancy): Perl's string equality operator eq performs a lexicographic comparison that halts at the first non-matching byte, making comparison time proportional to the length of the common prefix between the attacker-supplied signature and the expected HMAC value. Since HMAC-SHA signatures are deterministic given a fixed key and payload, an attacker can probe byte positions incrementally - submitting crafted tokens and measuring whether response latency increases - to recover the full expected signature one byte at a time. This class of oracle attack does not require knowledge of the HMAC secret directly; it exploits the comparison path rather than the cryptographic primitive. The fix, confirmed in commit b8aefb846613e44b5b12bc170898ffd5b05094a2, replaces the eq comparison with Mojo::Util::secure_compare(), which is a constant-time comparison function that eliminates the timing variation.

RemediationAI

Upgrade Mojo::JWT to version 1.02 or later, which replaces the non-constant-time eq comparison with Mojo::Util::secure_compare() in the decode() method. The patch is confirmed in upstream commit b8aefb846613e44b5b12bc170898ffd5b05094a2 and the 1.02 release is flagged by the maintainer as a mandatory security upgrade. Update via CPAN: cpanm Mojo::JWT or cpan Mojo::JWT. If an immediate upgrade is not feasible, a compensating control is to add artificial uniform-latency padding to all token validation responses (e.g., sleep until a fixed deadline per request), though this degrades performance and does not eliminate the channel if the attacker can subtract the padding or if jitter is insufficient. Restricting the rate of token submission requests at the application or WAF layer reduces the attacker's ability to aggregate measurements but does not eliminate the vulnerability. The only complete fix is the constant-time comparison in version 1.02. Reference: https://seclists.org/oss-sec/2026/q3/168.

Vendor StatusVendor

SUSE

Severity: Moderate

Share

CVE-2026-9537 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy