Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify Mojolicious OAuth2 login endpoint
-
DeliveryRead Date header to learn epoch seed
-
ExploitBrute-force rand() space to predict state
-
ExecutionLure victim to crafted callback URL
-
PersistVictim's browser submits attacker's code with predicted state
-
ImpactServer 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
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.
Primary rating from Vendor (CPANSec).
CVSS VectorVendor: CPANSec
Lifecycle Timeline
2DescriptionCVE.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
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.
More in Mojolicious
View allMojolicious versions from 0.999922 for Perl uses a hard coded string, or the application's class name, as an HMAC sessio
Mojolicious versions from 7.28 for Perl will generate weak HMAC session cookie secrets via "mojo generate app" by defaul
CSRF token disclosure in the Perl Mojolicious web framework (versions 4.59 up to but not including 9.48) allows a networ
Predictable session ID generation in Mojolicious::Sessions::Storable through version 0.05 for Perl exposes applications
EUVD-2026-38421
GHSA-rq65-66g5-5pg2
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB