# 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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.1
- **CVSS:** 8.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, login needed
- **EPSS:** 1.02% (percentile 63, 2026-11-26)
- **CWE:** CWE-321, CWE-331
- **Published:** 2025-05-03T16:08:55.042Z
- **Modified:** 2026-06-17T08:14:41.333Z

## Who should check

- Anyone running SRI Mojolicious \>= 0.999922, \<= \*

## 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 and fixed versions

- SRI Mojolicious: \>= 0.999922, \<= \* (cvelist)

## Mitigation

- Vendor workaround: Ensure that your Mojolicious application uses a unique secret of at least 128 bit of cryptographically secure random data. For example, to generate a 256 bit secret, one could use the output generated by the "openssl rand -base64 32" command.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-58134. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-58134.md
Affected: SRI Mojolicious >= 0.999922, <= *
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for SRI Mojolicious: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-58134 being exploited?

There is no confirmed exploitation: CVE-2024-58134 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 1.02% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-58134?

High: CVSS 8.1 (v3.1, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2024-58134?

SRI Mojolicious \>= 0.999922, \<= \*.

### Is there a fix for CVE-2024-58134?

No fixed version is listed in the sources yet. Vendor workaround: Ensure that your Mojolicious application uses a unique secret of at least 128 bit of cryptographically secure random data. For example, to generate a 256 bit secret, one could use the output generated by the "openssl rand -base64 32" command.

### How do I check if I'm affected by CVE-2024-58134?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://github.com/mojolicious/mojo/pull/1791>
- patch: <https://github.com/mojolicious/mojo/pull/2200>
- patch: <https://github.com/mojolicious/mojo/pull/2252>
- exploit: <https://github.com/hashcat/hashcat/pull/4090>
- article: <https://www.synacktiv.com/publications/baking-mojolicious-cookies>
- article: <https://medium.com/securing/baking-mojolicious-cookies-revisited-a-case-study-of-solving-security-problems-through-security-by-13da7c225802>
- article: <https://docs.mojolicious.org/Mojolicious/Guides/FAQ#What-does-Your-secret-passphrase-needs-to-be-changed-mean>
- other: <https://metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojolicious.pm#L51>
- other: <https://lists.debian.org/debian-perl/2025/05/msg00016.html>
- other: <https://lists.debian.org/debian-perl/2025/05/msg00017.html>
- other: <https://lists.debian.org/debian-perl/2025/05/msg00018.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-58134>

HTML: <https://flawdb.com/CVE-2024-58134> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-58134>
