CVE-2024-58134 Details
Description
Mojolicious versions from 0.999922 for Perl uses a hard coded string, or the application's class name, as an HMAC session cookie secret by default. These predictable default secrets can be exploited by an attacker to forge session cookies. An attacker who knows or guesses the secret could compute valid HMAC signatures for the session cookie, allowing them to tamper with or hijack another user’s session.
A vulnerability exists in Mojolicious versions 0.999922 prior to 9.40 for Perl, where a hard-coded string or the application's class name is used as the default HMAC session secret. These predictable secrets can be exploited to forge session cookies. An attacker who knows or guesses the secret can compute valid HMAC signatures for the session cookie, enabling them to tamper with or hijack another user's session.
Users can set a strong, random HMAC secret in their Mojolicious application to mitigate this vulnerability. This can be done by updating the application's configuration to include a secure secret passphrase.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed May 12, 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://docs.mojolicious.org/Mojolicious/Guides/FAQ#What-does-Your-secret-passphrase-needs-to-be-changed-mean | CPANSec | |
| https://github.com/hashcat/hashcat/pull/4090 | CPANSec | Issue TrackingPatch |
| https://github.com/mojolicious/mojo/pull/1791 | CPANSec | Issue TrackingPatch |
| https://github.com/mojolicious/mojo/pull/2200 | CPANSec | Issue TrackingPatch |
| https://github.com/mojolicious/mojo/pull/2252 | CPANSec | |
| https://lists.debian.org/debian-perl/2025/05/msg00016.html | CPANSec | |
| https://lists.debian.org/debian-perl/2025/05/msg00017.html | CPANSec | |
| https://lists.debian.org/debian-perl/2025/05/msg00018.html | CPANSec | |
| https://medium.com/securing/baking-mojolicious-cookies-revisited-a-case-study-of-solving-security-problems-through-security-by-13da7c225802 | CPANSec | Third Party Advisory |
| https://metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojolicious.pm#L51 | CPANSec | Product |
| https://www.synacktiv.com/publications/baking-mojolicious-cookies | CPANSec | Exploit |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-321 | Use of Hard-coded Cryptographic Key | CPANSec |
| CWE-331 | Insufficient Entropy | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| mojolicious mojolicious | >= 0.999922, <= 9.40 |
CPE
Remediation
| |
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 17, 2026 | CVE Modified | CPANSec |
| Oct 20, 2025 | CVE Modified | CPANSec |
| Jun 17, 2025 | Initial Analysis | [email protected] |
| May 12, 2025 | CVE Modified | CPANSec |
| May 12, 2025 | CVE Modified | CISA-ADP |
| May 3, 2025 | New CVE Received | CPANSec |