CVE-2025-40915 Details
Description
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.
A vulnerability exists in Mojolicious::Plugin::CSRF version 1.03 for Perl, where the plugin uses a weak random number generator to create Cross-Site Request Forgery (CSRF) tokens. The vulnerable version generates tokens by applying the MD5 hash to the process ID, the current time, and a single invocation of the built-in rand() function. This approach to token generation can lead to predictable and easily guessable tokens, undermining the effectiveness of CSRF protection.
Users can upgrade to Mojolicious::Plugin::CSRF version 1.04, which addresses this vulnerability by using Crypt::URandom for cryptographic randomness in token generation.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jun 11, 2025CISA-ADP
Assessed Jun 11, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://metacpan.org/release/GRYPHON/Mojolicious-Plugin-CSRF-1.04/changes | CPANSec | Release NotesVendor |
| https://metacpan.org/release/GRYPHON/Mojolicious-Plugin-CSRF-1.04/diff/GRYPHON/Mojolicious-Plugin-CSRF-1.03 | CPANSec | Source CodeVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-338 | Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| GRYPHON Mojolicious::Plugin::CSRF | All versions |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | CPANSec |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 11, 2025 | CVE Modified | CISA-ADP |
| Jun 11, 2025 | New CVE Received | CPANSec |
Volerion