CVE-2024-58134
JSON

8.1high

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

Severity
8.1high CVSS:3.1 by CISA-ADP
Exploit likelihood
0.57% (higher than 48% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
CPANSec

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

Product or packageVersionsReported by
Mojoliciousfrom 0.999922 up to *CVE List
mojolicious mojoliciousfrom 0.999922 up to 9.40NVD

Classification

CWE-321CWE-331

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Las versiones de Mojolicious de la 0.999922 a la 9.39 para Perl utilizan una cadena de código fijo, o el nombre de la clase de la aplicación, como secreto de sesión HMAC por defecto. Estos secretos predeterminados predecibles pueden explotarse para falsificar cookies de sesión. Un atacante que conozca o adivine el secreto podría calcular firmas HMAC válidas para la cookie de sesión, lo que le permitiría manipular o secuestrar la sesión de otro usuario.

References

https://github.com/mojolicious/mojo/pull/1791issue-tracking, patch
https://github.com/mojolicious/mojo/pull/2200issue-tracking, patch
https://www.synacktiv.com/publications/baking-mojolicious-cookiesexploit, technical-description
https://medium.com/securing/baking-mojolicious-cookies-revisited-a-case-study-of-solving-security-problems-through-security-by-13da7c225802technical-description, third-party-advisory
https://metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojolicious.pm#L51product, related
https://github.com/hashcat/hashcat/pull/4090exploit, issue-tracking, patch
https://lists.debian.org/debian-perl/2025/05/msg00016.htmlmailing-list
https://lists.debian.org/debian-perl/2025/05/msg00017.htmlmailing-list
https://lists.debian.org/debian-perl/2025/05/msg00018.htmlmailing-list
https://github.com/mojolicious/mojo/pull/2252issue-tracking
https://docs.mojolicious.org/Mojolicious/Guides/FAQ#What-does-Your-secret-passphrase-needs-to-be-changed-meantechnical-description

Sources

SourceRecordLicence
CVE ListCVE-2024-58134 changed 2025-10-20CVE Terms of Use
NVDCVE-2024-58134 changed 2026-06-17Public domain