Mojolicious: Use of Hard-coded Cryptographic Key
CVE-2024-58134 is a high-severity use of hard-coded cryptographic key vulnerability in Mojolicious from SRI, with a CVSS 3.1 base score of 8.1 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, without any action from a user. Affected Mojolicious versions: 0.999922 and later. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.56% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of Mojolicious you run against the affected versions below, and install the vendor's latest release.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| SRI | Mojolicious | 0.999922 and later | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- NoneAvailability is not affected.
Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N. Scored by CISA (ADP).
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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use of Hard-coded Cryptographic Key
The product uses a hard-coded, unchangeable cryptographic key.
How developers prevent this class of flaw
- Prevention schemes mirror that of hard-coded password storage.
More Use of Hard-coded Cryptographic Key vulnerabilities (CWE-321)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- github.com/hashcat/hashcat/pull/4090Issue Tracking
- github.com/mojolicious/mojo/pull/1791Issue Tracking
- github.com/mojolicious/mojo/pull/2200Issue Tracking
- github.com/mojolicious/mojo/pull/2252
Third-party and government advisories
Technical write-ups (may include proof of concept)
Other references
- docs.mojolicious.org/Mojolicious/Guides/FAQ#What-does-Your-secret-passphrase-needs-to-be-changed-mean
- lists.debian.org/debian-perl/2025/05/msg00016.html
- lists.debian.org/debian-perl/2025/05/msg00017.html
- lists.debian.org/debian-perl/2025/05/msg00018.html
- metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojolicious.pm#L51Product
Other vulnerabilities in Mojolicious
- 9.1 Critical severity
Recent Use of Hard-coded Cryptographic Key vulnerabilities
- 9.8 Critical severity
- 9.0 Critical severity
- 8.3 High severity
- 8.8 High severity
- 7.7 High severity
- 7.0 High severity
Spotted an error? Tell us.