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
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Submit HMAC-signed JWT to decode() endpoint
  2. Delivery
    Measure per-request response time variation
  3. Exploit
    Increment candidate signature bytes systematically
  4. Install
    Aggregate timing deltas to identify matching prefix bytes
  5. C2
    Reconstruct full expected HMAC signature
  6. Execute
    Craft forged JWT with arbitrary claims
  7. Impact
    Submit forged token to impersonate any user

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V6 - Authentication Timing attack prevention
Exploitation Conditions

The vulnerable code path is triggered whenever the decode() method of Mojo::JWT processes an HMAC-signed token (HS256, HS384, or HS512 algorithms). No special server configuration is required - any endpoint that accepts attacker-supplied JWTs and calls decode() is exposed. The attacker must be able to submit a large volume of requests (hundreds to thousands per target byte position) and measure per-request latency with sufficient precision; high-latency or high-jitter network paths degrade attack feasibility. The attack does not apply to RSA or ECDSA (asymmetric) JWT algorithms because those use a different verification path. Exploitation is limited by the need for a low-noise measurement environment and the volume of requests required to achieve statistical confidence, which may trigger rate-limiting or anomaly detection.

Impact

The NVD-assigned CVSS 3.1 score of 5.3 with vector AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N assigns AC:L and C:N, both of which understate the practical difficulty and the confidentiality dimension. Recovering an HMAC signature via timing requires a statistically significant volume of requests under stable or measurable network latency conditions - this is practically AC:H, not AC:L. Additionally, the attack recovers cryptographic material (the expected signature bytes), which constitutes a confidentiality impact omitted from the NVD vector. EPSS at 0.17% (7th percentile) and no KEV listing confirm this has not been exploited in the wild at scale, consistent with the attack's requirement for many controlled measurements. The realistic priority is medium for applications where JWT tokens carry high-value authorization claims (admin roles, API access), but lower for internal services or those with network-level noise that would impede timing precision. The patch is already available and straightforward to apply, meaning the remediation path has no ambiguity.

Exploit ScenarioDerived

An attacker targets a Mojolicious API endpoint that accepts and decodes JWT tokens for authentication or authorization. By submitting thousands of crafted tokens with systematically varied signature bytes and measuring the microsecond-level differences in server response times, the attacker incrementally identifies each correct signature byte. Once the full expected HMAC signature is recovered, the attacker constructs a forged JWT with elevated claims (e.g., admin role) and a valid signature, bypassing authentication without knowledge of the HMAC secret key. No public exploit has been identified at time of analysis, but the attack technique is well-documented in timing oracle literature.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 20, 2026

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.

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.

Affected VersionsENISA

Mojo::JWT 0 <1.02

Affected Packages

euvd mojo_jwt fix: 1.02

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

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.

Know when Mojo gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

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

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

2
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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Prevalence
Low
niche Perl/Mojolicious ecosystem library, limited enterprise footprint
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Vendor StatusVendor

SUSE

Severity: Moderate

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