Skip to main content

Mojolicious OAuth2 Plugin EUVDEUVD-2026-38421

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

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

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

3
Analysis Generated
Jun 23, 2026 - 15:53 vuln.today
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).

AnalysisAI

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.

Technical ContextAI

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.

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.

Share

EUVD-2026-38421 vulnerability details – vuln.today

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