CVE-2026-9733
Received Received - Intake
Predictable State Parameter in Mojolicious OAuth2 Plugin

Publication date: 2026-06-23

Last updated on: 2026-06-23

Assigner: CPANSec

Description
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).
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-23
Last Modified
2026-06-23
Generated
2026-06-23
AI Q&A
2026-06-23
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
mojolicious plugin_web_auth_oauth2 to 0.17 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-340 The product uses a scheme that generates numbers or identifiers that are more predictable than required.
CWE-338 The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Impact Analysis

This vulnerability can allow an attacker to hijack a user's session by predicting the OAuth2 state parameter used to prevent CSRF attacks.

By exploiting the predictable state, an attacker can perform cross-site request forgery attacks, potentially gaining unauthorized access to user accounts or sensitive information.

Executive Summary

The vulnerability exists in Mojolicious::Plugin::Web::Auth::OAuth2 versions through 0.17 for Perl, where the default state parameter used in OAuth2 authentication is insecure.

When no custom state generator is specified, the module uses a SHA-1 hash of predictable and low-entropy sources such as the epoch time (which can be observed via the HTTP Date header) and Perl's built-in rand function.

Because the state value is predictable, an attacker can exploit this to hijack another user's session through a cross-site request forgery (CSRF) attack.

Detection Guidance

This vulnerability involves the Mojolicious::Plugin::Web::Auth::OAuth2 Perl module using an insecure default state parameter that is predictable. Detection involves identifying usage of this module version (through 0.17) in your web applications.

You can check for the presence of the vulnerable module version in your system by searching for the module files or inspecting your Perl dependencies.

  • Use a command to find the module version, for example: perl -MMojolicious::Plugin::Web::Auth::OAuth2 -e 'print $Mojolicious::Plugin::Web::Auth::OAuth2::VERSION . "\n";'
  • Search your codebase for usage of Mojolicious::Plugin::Web::Auth::OAuth2 and check if the state generator is customized or left as default.

Network detection of exploitation attempts could involve monitoring for CSRF attack patterns or suspicious OAuth2 authorization requests with predictable state parameters, but specific commands for this are not provided in the available resources.

Mitigation Strategies

To mitigate this vulnerability, update the Mojolicious::Plugin::Web::Auth::OAuth2 module to a version that includes the security patch which replaces the insecure state generator with a cryptographically secure random byte generator.

Specifically, upgrade to Mojolicious version 9.46 or later, as this version includes the fix that uses Mojo::Util::random_bytes for generating the OAuth2 state parameter.

Additionally, ensure that the Net::OAuth module is updated to version 0.30 or later to address related security issues.

If upgrading immediately is not possible, consider customizing the state generator in your OAuth2 plugin constructor to use a secure random generator instead of the default.

Compliance Impact

The vulnerability in Mojolicious::Plugin::Web::Auth::OAuth2 versions through 0.17 involves an insecure default state parameter that is predictable. This predictability allows attackers to hijack user sessions through cross site request forgery (CSRF).

Such session hijacking risks can lead to unauthorized access to user data, which may result in violations of data protection regulations like GDPR and HIPAA that require strong security controls to protect personal and sensitive information.

Therefore, this vulnerability potentially undermines compliance with these standards by weakening the security of authentication flows and exposing user sessions to attack.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-9733. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart