# CVE-2024-58134: 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: High 8.1 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.57%, higher than 48% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2025-05-03T16:08:55.042Z
- Modified: 2026-06-17T08:14:41.333Z
- Weaknesses: CWE-321, CWE-331
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- Mojolicious: from 0.999922 up to *
- mojolicious mojolicious: from 0.999922 up to 9.40

## References

- <https://www.synacktiv.com/publications/baking-mojolicious-cookies> (exploit, technical-description)
- <https://github.com/hashcat/hashcat/pull/4090> (exploit, issue-tracking, patch)
- <https://github.com/mojolicious/mojo/pull/1791> (issue-tracking, patch)
- <https://github.com/mojolicious/mojo/pull/2200> (issue-tracking, patch)
- <https://medium.com/securing/baking-mojolicious-cookies-revisited-a-case-study-of-solving-security-problems-through-security-by-13da7c225802> (technical-description, third-party-advisory)
- <https://metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojolicious.pm#L51> (product, related)
- <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)

## Sources

- CVE List: [CVE-2024-58134](https://www.cve.org/CVERecord?id=CVE-2024-58134), CVE Terms of Use, modified 2025-10-20
- NVD: [CVE-2024-58134](https://nvd.nist.gov/vuln/detail/CVE-2024-58134), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-58134 · Whole record: https://cve.day/CVE-2024-58134.json · Rebuilt by cve.day 2026-11-25T22:58:52.578Z
