Skip to main content

Mojolicious OAuth2 Plugin CVE-2026-9733

| EUVDEUVD-2026-38421 CRITICAL
Generation of Predictable Numbers or Identifiers (CWE-340)
2026-06-23 CPANSec GHSA-rq65-66g5-5pg2
9.1
CVSS 3.1 · Vendor: CPANSec
View

Attack ChainAIDerived

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

  1. Access
    Identify Mojolicious OAuth2 login endpoint
  2. Delivery
    Read Date header to learn epoch seed
  3. Exploit
    Brute-force rand() space to predict state
  4. Execution
    Lure victim to crafted callback URL
  5. Persist
    Victim's browser submits attacker's code with predicted state
  6. Impact
    Server binds victim session to attacker's IdP account

Vulnerability Assessment

Weakness
CWE
Exploitation Conditions

Exploitation requires (1) the target application uses Mojolicious::Plugin::Web::Auth::OAuth2 ≤0.17 without passing a custom state generator to the constructor - applications that already override the state callback are not affected; (2) the OAuth2 callback endpoint is reachable by the attacker over the network; and (3) a victim is induced to visit an attacker-crafted authorization or callback URL while authenticated, which in practice is a user-interaction prerequisite even though CVSS encodes UI:N. The HTTP Date header must also be readable (it is by default on Mojolicious responses), and the server's rand() state must not have been re-seeded with a high-entropy source.

Impact

The CVSS 3.1 base score of 9.1 (AV:N/AC:L/PR:N/UI:N/C:H/I:H/A:N) reflects that an unauthenticated network attacker can compromise confidentiality and integrity of a victim's authenticated session, but the practical risk is meaningfully lower than the headline number suggests. EPSS at 0.19% (8th percentile) and SSVC Exploitation:none indicate no observed exploitation, and the vulnerability is not in CISA KEV; SSVC Automatable:yes and Technical Impact:total acknowledge that, when reached, an attack can be scripted and yields full session takeover. The CVSS UI:N choice is also debatable - successful CSRF exploitation typically requires the victim to follow an attacker-crafted authorization URL, which is closer to UI:R in practice, so this is best treated as a high-impact-when-triggered issue rather than a wormable critical. Overall this is a real patch-soon issue for any Perl/Mojolicious site doing OAuth2 logins with the module's default state generator, but not a drop-everything emergency.

Exploit ScenarioDerived

An attacker initiates an OAuth2 authorization request on the target Mojolicious application, observes the HTTP Date response header to learn the epoch seed, and brute-forces the small rand() space to precompute the SHA-1 state value the server will accept. They then lure a logged-in victim (e.g., via a phishing link or malicious page) to a crafted callback URL containing the attacker's authorization code and the precomputed state, causing the victim's session to be bound to the attacker-controlled identity provider account.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
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 – Jun 23, 2026

CSRF session hijacking in Mojolicious::Plugin::Web::Auth::OAuth2 through version 0.17 for Perl stems from a predictable default state parameter built from a SHA-1 hash of leaked epoch time and Perl's weak rand(). Remote attackers can guess or precompute valid state values to forge OAuth2 authorization responses and bind a victim's session to an attacker-controlled identity. No public exploit identified at time of analysis, EPSS is low (0.19%, 8th percentile), and a vendor patch is available.

RemediationAI

Patch available per vendor advisory: apply the official fix from https://security.metacpan.org/patches/M/Mojolicious-Plugin-Web-Auth/0.17/CVE-2026-9733-r2.patch and upgrade to the corresponding fixed release of Mojolicious-Plugin-Web-Auth once published on CPAN, as referenced in the oss-security advisory https://seclists.org/oss-sec/2026/q2/1001 and VulDB entry https://vuldb.com/vuln/372875. As an immediate compensating control until the upgrade is rolled out, supply an explicit cryptographically strong state generator to the plugin constructor (for example one backed by Crypt::URandom or Bytes::Random::Secure producing at least 128 bits of entropy bound to the user session), which removes reliance on the vulnerable default with no functional side effects beyond a one-line configuration change. Additionally validate that the returned state matches the per-session stored value on the OAuth2 callback and review logs for anomalous callback patterns; suppressing the HTTP Date header is not a reliable mitigation because rand() alone remains predictable.

Affected VersionsENISA

Mojolicious::Plugin::Web::Auth::OAuth2 0 ≤0.17

Affected Packages

euvd mojolicious_plugin_web_auth_oauth2 no fix

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

Mojolicious::Plugin::Web::Auth::OAuth2 is a Perl module that implements the OAuth2 client flow on top of the Mojolicious web framework, handling redirects to identity providers and validating callback responses. RFC 6749 §10.12 requires the OAuth2 'state' parameter to be a cryptographically unguessable, per-session value to defend the redirect_uri callback against CSRF. The affected versions (cpe:2.3:a:hayajo:mojolicious::plugin::web::auth::oauth2 through 0.17) instead default to SHA1(epoch_time . rand()), where the epoch timestamp is exposed in the HTTP Date response header and Perl's built-in rand() is a non-cryptographic PRNG, producing a state space attackers can reconstruct. This is a textbook CWE-340 (Predictable from Observable State) weakness applied to a security-critical anti-CSRF token.

Know when Mojolicious 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 9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 6.8 MEDIUM

CSRF session hijack needs victim to click attacker link (UI:R) and successful rand()/epoch prediction (AC:H); no auth needed; full session C/I impact, no availability effect.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (CPANSec).

CVSS VectorVendor: CPANSec

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

Lifecycle Timeline

2
CVSS changed
Jun 23, 2026 - 15:53 NVD
9.1 (None) 9.1 (CRITICAL)
CVE Published
Jun 23, 2026 - 07:05 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

Mojolicious::Plugin::Web::Auth::OAuth2 versions through 0.17 for Perl have an insecure default state parameter.

When no state generator is specified in the constructor, the module defaults to using a SHA-1 hash of predictable and low-entropy sources, including the epoch time (which is leaked via the HTTP Date header) and a call to Perl's built-in rand function.

A predictable state allows an attacker to hijack another user's session through cross site request forgery (CSRF).

Executive ViewAI

Why It Matters

Mojolicious::Plugin::Web::Auth::OAuth2 (versions through 0.17) contains a critical session hijacking vulnerability that allows remote attackers to forge OAuth2 responses and impersonate users, potentially compromising user accounts across applications using this authentication plugin. Although a vendor patch is available and exploitation is statistically unlikely (0.2% EPSS), any organization relying on this plugin should prioritize patching due to the fundamental impact on authentication integrity.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
Low
niche Perl Mojolicious OAuth2 plugin, limited production footprint
Social Media
1
Sightings
Data Quality
6 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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Total

Priority Score

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

Attack Technique

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

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