Vulnerability · Published May 3, 2025 · Assigned by CPANSec
CVE-2024-58134Mojolicious 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
High 8.1
In plain English
A high-severity security flaw in Mojolicious from SRI. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 47% of all known vulnerabilities).
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | libmojolicious-perl | no fix listed | DEBIAN-CVE-2024-58134 |
| Debian:13 | libmojolicious-perl | no fix listed | DEBIAN-CVE-2024-58134 |
| Debian:14 | libmojolicious-perl | no fix listed | DEBIAN-CVE-2024-58134 |
| Ubuntu:22.04:LTS | libmojolicious-perl | no fix listed | UBUNTU-CVE-2024-58134 |
| Ubuntu:24.04:LTS | libmojolicious-perl | no fix listed | UBUNTU-CVE-2024-58134 |
| Ubuntu:25.10 | libmojolicious-perl | no fix listed | UBUNTU-CVE-2024-58134 |
| Ubuntu:26.04:LTS | libmojolicious-perl | no fix listed | UBUNTU-CVE-2024-58134 |
| Ubuntu:26.10 | libmojolicious-perl | no fix listed | UBUNTU-CVE-2024-58134 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| SRI | Mojolicious | 0.999922 – through * |
Weakness: CWE-321, CWE-331 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
References
- https://github.com/mojolicious/mojo/pull/1791 issue-tracking
- https://github.com/mojolicious/mojo/pull/2200 issue-tracking
- https://www.synacktiv.com/publications/baking-mojolicious-cookies technical-description
- https://medium.com/securing/baking-mojolicious-cookies-revisited-a-case-study-of-solving-security-problems-through-security-by-13da7c225802 technical-description
- https://metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojolicious.pm#L51 related
- https://github.com/hashcat/hashcat/pull/4090 exploit
- https://lists.debian.org/debian-perl/2025/05/msg00016.html mailing-list
- https://lists.debian.org/debian-perl/2025/05/msg00017.html mailing-list
- https://lists.debian.org/debian-perl/2025/05/msg00018.html mailing-list
- https://github.com/mojolicious/mojo/pull/2252 issue-tracking
- https://docs.mojolicious.org/Mojolicious/Guides/FAQ#What-does-Your-secret-passphrase-needs-to-be-changed-mean technical-description