Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Cryptographic PRNG selection
|
| Impact | CVSS 7.0 (High) with AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:L indicates remote attackability without privileges, but AC:H (High Complexity) suggests non-trivial exploitation. However, the AC:H rating may underestimate real-world risk: token prediction attacks are deterministic once the attacker knows or can infer the process ID, timestamp window, and rand() seed—factors that are often inferable or brute-forceable. The Confidentiality impact (High) suggests successful CSRF can leak sensitive data or perform unauthorized actions. Exploitation does not require user interaction (UI:N), and the attack is network-accessible (AV:N). KEV status is unknown (not confirmed in CISA catalog as of this analysis), but the vulnerability is deterministic and not patched by default, increasing enterprise risk. EPSS score is not provided, but deterministic cryptographic weaknesses typically score in the 0.6–0.8 range. SSVC factors: exploitation is likely possible with publicly available tools (token prediction/brute-force); automatable attacks are feasible (SSVC=AUTOMATABLE); technical impact is HIGH (CSRF bypass = account takeover, unauthorized transactions). Real-world priority is MEDIUM-to-HIGH for applications handling sensitive transactions (banking, e-commerce) and LOW for read-only applications. |
| Exploit ScenarioDerived | An attacker targeting a Mojolicious application using the vulnerable CSRF plugin conducts the following attack: (1) The attacker identifies the target application's deployment environment (e.g., via timing side-channels or DNS records revealing it runs on a container with predictable process IDs). (2) The attacker obtains or infers the current server time and process ID space. (3) The attacker generates a set of candidate CSRF tokens by computing MD5(pid || timestamp || rand_value) for a range of likely PID, timestamp, and rand() values. (4) The attacker crafts a malicious HTML page with an auto-submitting form (e.g., fund transfer) that includes one of the predicted tokens. (5) When a legitimate user visits the attacker's page while logged into the target application, the form is submitted with the predicted (now valid) CSRF token, bypassing CSRF protection. (6) The unauthorized action (e.g., account fund transfer, password change) is executed. AC:H in the CVSS reflects the complexity of inferring process ID and timestamp, but with container forensics or timing analysis, this complexity is reduced. No public POC is referenced in the CVE data, but token prediction tools are straightforward to construct given the weak algorithm. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 14, 2026
Mojolicious::Plugin::CSRF version 1.03 generates CSRF tokens using weak entropy sources (process ID, current time, and a single rand() call hashed with MD5), allowing attackers to predict or brute-force valid CSRF tokens and bypass CSRF protections. This affects Perl web applications using this specific plugin version. The vulnerability is not currently listed in CISA KEV, but the weak randomness makes token prediction feasible without requiring user interaction or high attack complexity.
RemediationAI
Patch/Upgrade: Update CPAN dependency: cpan upgrade Mojolicious::Plugin::CSRF or update Makefile.PL/cpanfile to require patched version. Workaround (Temporary): Use Crypt::Random or Crypt::OpenSSL::Random for token generation; override the plugin's token method or disable it and implement alternative CSRF validation. Mitigation: Implement SameSite cookie attributes (SameSite=Strict or Lax) as a defense-in-depth measure to reduce CSRF attack surface regardless of token strength. Detection: Use software composition analysis (SCA) tools or cpan outdated command to identify deployed version 1.03 instances.
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::CSRF is a Perl module that implements Cross-Site Request Forgery (CSRF) protection for the Mojolicious web framework. CVE-2025-40915 stems from CWE-338 (Use of Cryptographically Weak Pseudo-Random Number Generator), a critical weakness in cryptographic token generation. The vulnerable implementation combines: (1) process ID—often sequential and predictable in containerized/cloud environments; (2) current time—low entropy with only millisecond or second granularity; (3) single rand() call—Perl's built-in rand() is not cryptographically secure and uses a predictable seeding mechanism. These three components are concatenated and hashed via MD5, but the hash of weak inputs remains weak. MD5 itself is cryptographically broken, compounding the issue. Affected CPE: pkg:perl/mojolicious-plugin-csrf@1.03. The module is installed via CPAN and integrated into Mojolicious applications for form token validation.
Know when the next one hits your stack
- 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:H/PR:N/UI:N/S:U/C:H/I:L/A:L
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:L
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
2DescriptionCVE.org
Mojolicious::Plugin::CSRF 1.03 for Perl uses a weak random number source for generating CSRF tokens.
That version of the module generates tokens as an MD5 of the process id, the current time, and a single call to the built-in rand() function.
Executive ViewAI
Perl-based web applications using Mojolicious::Plugin::CSRF version 1.03 are vulnerable to CSRF token prediction attacks, allowing attackers to forge valid tokens and perform unauthorized actions on behalf of authenticated users. This affects any organization running this specific plugin version without compensating controls, potentially compromising user account security and data integrity.
Until a patch is released: (1) Enforce SameSite=Strict cookie attribute on session cookies; (2) Implement additional per-request validation using custom headers or double-submit cookie patterns; (3) Deploy WAF rules to detect and block suspicious CSRF token patterns or repeated token usage; (4) Consider disabling the plugin and implementing alternative CSRF protection if the plugin remains unpatched; (5) Increase logging and monitoring of state-changing requests for anomalies.
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.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Same technique Information Disclosure
View allVendor StatusVendor
SUSE
Severity: Medium| Product | Status |
|---|---|
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Fixed |
EUVD-2025-18132
NVD
CVE.org
EPSS
GitHub PoC
Exploit-DB