CVE-2024-58135 json
Mojolicious versions from 7.28 through 9.45 for Perl will generate weak HMAC session cookie secrets via "mojo generate app" by default
published 2025-05-03 18 mo ago modified 2026-06-17 4 mo ago also EUVD-2025-13365
- cvss
- 5.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 47%
- public exploits
- 0
- none known
Summary
Mojolicious versions from 7.28 through 9.45 for Perl will generate weak HMAC session cookie secrets via "mojo generate app" by default.
When creating a default app skeleton with the "mojo generate app" tool, a weak secret is written to the application's configuration file using the insecure rand() function, and used for authenticating and protecting the integrity of the application's sessions. This may allow an attacker to brute force the application's session keys.
Release 9.46 fixes the issue by providing high quality randomness, even in absence of CryptX.
Users should be aware that the update does not replace previously generated weak secrets. A secret generated with the previous version MUST be replaced to ensure the updated version is using a strong secret.
Patch / fix
- github.com/mojolicious/mojo@fb3733f commit
- github.com/mojolicious/mojo@789cfa4 commit
- github.com/mojolicious/mojo#2200 pull request
- github.com/hashcat/hashcat#4090 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-58135 updated cvss 6.2
Mojolicious: Mojolicious versions from 7.28 through 9.39 for Perl may generate weak HMAC session secrets
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 18 mo ago
Exploit prediction
0.57% chance of exploitation in the next 30 days, higher than 47% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/mojolicious/mojo/pull/2200 referenced PoC, tagged "exploit" by a source, unverified
- github.com https://github.com/hashcat/hashcat/pull/4090 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CISA ADP | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| CNA | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
Affected products
- SRI Mojolicious
Classification
- Weakness
-
- CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
References
-
github.com
/mojolicious/mojo/pull/2200
issue-tracking, exploit, patch
-
github.com
/hashcat/hashcat/pull/4090
exploit, issue-tracking, patch
-
github.com
/mojolicious/mojo/commit/fb3733f92cc8a3344e6d615b3c7dac9d538eeab0.patch
patch
-
github.com
/mojolicious/mojo/commit/789cfa43f9118852b38cbd1fd0a2596bcb9821ea.patch
patch
-
perldoc.perl.org
/functions/rand
related, product
-
metacpan.org
/release/SRI/Mojolicious-9.39/source/lib/Mojo/Util.pm#L181
related, product
-
metacpan.org
/release/SRI/Mojolicious-9.38/source/lib/Mojolicious/Command/Author/generate/app.pm#L202
related, product
-
metacpan.org
/release/SRI/Mojolicious-7.28/source/lib/Mojolicious/Command/generate/app.pm#L220
related, product
-
security.metacpan.org
/docs/guides/random-data-for-security.html
technical-description
-
lists.debian.org
/debian-perl/2025/05/msg00016.html
mailing-list
-
lists.debian.org
/debian-perl/2025/05/msg00017.html
mailing-list
-
lists.debian.org
/debian-perl/2025/05/msg00018.html
mailing-list
-
metacpan.org
/release/SRI/Mojolicious-9.46/source/Changes
release-notes
Sources
- CVE List CVE-2024-58135
- NVD CVE-2024-58135
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.