CVE-2024-58134
published high CVSS 3.1 · 8.1Mojolicious 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
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SRI | — | Mojolicious0.999922 and later · Other versions: unaffected | Affected | Not stated | CPANSec |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2025-985 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | perl-Mojoliciousnoarch | Listed in advisory | Not stated | ALAS2023-2025-985 |
| Amazon Linux | AL2023 | perl-Mojolicioussrc | Listed in advisory | Not stated | ALAS2023-2025-985 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.1 / 10
- Severity
- high
- Provider
- CISA-ADP · adp
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| SRI | Mojolicious | 0.999922 and later (affected · custom)Default: unaffected | CPANSec · cna |
Weaknesses
2- CWE-321 CWE-321 Use of Hard-coded Cryptographic Key
- CWE-331 CWE-331 Insufficient Entropy
References
11- https://docs.mojolicious.org/Mojolicious/Guides/FAQ#What-does-Your-secret-passphrase-needs-to-be-changed-mean
- https://github.com/hashcat/hashcat/pull/4090
- https://github.com/mojolicious/mojo/pull/1791
- https://github.com/mojolicious/mojo/pull/2200
- https://github.com/mojolicious/mojo/pull/2252
- https://lists.debian.org/debian-perl/2025/05/msg00016.html
- https://lists.debian.org/debian-perl/2025/05/msg00017.html
- https://lists.debian.org/debian-perl/2025/05/msg00018.html
- https://medium.com/securing/baking-mojolicious-cookies-revisited-a-case-study-of-solving-security-problems-through-security-by-13da7c225802
- https://metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojolicious.pm#L51
- https://www.synacktiv.com/publications/baking-mojolicious-cookies
Provider assertions
2CPANSec · cna
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
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 650f1c4aa19822764d9f4d8a7a9830ca36b9870c8a1ec93bb8b0ab926adacfca
- Ingested
- 23 Sep 2026, 08:32:30 UTC
- Source record
- Official CVE record