Home / SRI / Mojolicious / CVE-2024-58135
CVE-2024-58135: is it exploited, and which versions of SRI Mojolicious are affected and fixed?
CVE-2024-58135 is a weak random number generator vulnerability in SRI Mojolicious. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 16:39 UTC). Affected: Mojolicious from 7.28 through 9.45 (CVE record by CPANSec). No fixed version is listed in the sources yet; check the vendor advisory. Severity: Medium (5.3, CVSS 3.1, from CISA-ADP).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 16:39 UTC, CVE record November 19, 2026, 07:10 UTC and NVD November 19, 2026, 07:20 UTC.
What is CVE-2024-58135?
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.
From the CVE record by CPANSec, last updated June 5, 2026, 12:37 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| SRI | Mojolicious | from 7.28 through 9.45 |
As the CVE record by CPANSec states it, last updated June 5, 2026. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| mojolicious | mojolicious | from 7.28 through 9.40 | application |
NVD analysis (status Modified), last modified June 17, 2026, 08:14 UTC.
How severe is CVE-2024-58135?
| Score | Version | Vector | Source |
|---|---|---|---|
| Medium 5.3 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N | CISA-ADP |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2024-58135 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: poc; automatable: no; technical impact: partial (CISA ADP, May 5, 2025)
- EPSS
- 0.58% probability of exploitation activity in the next 30 days, percentile 49.4 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
- CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
How do I fix it? (from the CVE record)
Upgrade to version 9.46 and replace previously generated secrets.
Is there a workaround? (from the CVE record)
Ensure that your secret, stored in the application's configuration file, is 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.
Where are the vendor advisories and references?
- https://perldoc.perl.org/functions/rand related
- https://metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojo/Util.pm#L181 related
- https://metacpan.org/release/SRI/Mojolicious-9.38/source/lib/Mojolicious/Command/Author/generate/app.pm#L202 related
- https://github.com/mojolicious/mojo/pull/2200 issue-tracking
- https://metacpan.org/release/SRI/Mojolicious-7.28/source/lib/Mojolicious/Command/generate/app.pm#L220 related
- https://security.metacpan.org/docs/guides/random-data-for-security.html technical-description
- https://github.com/hashcat/hashcat/pull/4090 exploit
- 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://metacpan.org/release/SRI/Mojolicious-9.46/source/Changes release-notes
- https://github.com/mojolicious/mojo/commit/fb3733f92cc8a3344e6d615b3c7dac9d538eeab0.patch patch
- https://github.com/mojolicious/mojo/commit/789cfa43f9118852b38cbd1fd0a2596bcb9821ea.patch patch
When was it published, and where is the official record?
- Reserved
- April 7, 2025
- Published
- May 3, 2025, 10:16 UTC
- CVE record updated
- June 5, 2026, 12:37 UTC by CPANSec
- NVD
- Modified, last modified June 17, 2026, 08:14 UTC
- Last checked
- CVE list November 19, 2026, 07:10 UTC; NVD November 19, 2026, 07:20 UTC; KEV December 3, 2026, 16:39 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
What other CVEs affect Mojolicious?
- Jul 14, 2026CVE-2026-15747 SRI Mojolicious: observable Response Discrepancy
- May 3, 2025CVE-2024-58134 SRI Mojolicious: hard-coded cryptographic key
Questions about CVE-2024-58135
Is CVE-2024-58135 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 16:39 UTC. FIRST's EPSS gives it a 0.58% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of SRI Mojolicious are affected by CVE-2024-58135?
Mojolicious from 7.28 through 9.45, per the CVE record by CPANSec. The tables above give every range the sources list.
Which version fixes CVE-2024-58135?
None of the sources (the CVE record, the NVD and GitHub's reviewed advisories) lists a fixed version yet. Check the vendor's advisory in the references.
How severe is CVE-2024-58135?
Medium (5.3, CVSS 3.1, from CISA-ADP). The severity table above shows each score with its source.
Where is the official record of CVE-2024-58135?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.