CVE-2024-58135

CVE-2024-58135 is a medium-severity vulnerability in Mojolicious with a CVSS 3.x base score of 5.3. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-338.

Key facts

Description

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.

Frequently asked questions

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.
How severe is CVE-2024-58135?
CVE-2024-58135 has a CVSS 3.x base score of 5.3, rated medium severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is low, integrity none, and availability none.
Is CVE-2024-58135 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (38th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2024-58135?
CVE-2024-58135 affects Mojolicious. See the affected-products list for the exact vulnerable versions.
How do I fix CVE-2024-58135?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
Does CVE-2024-58135 have an EU (EUVD) identifier?
Yes. CVE-2024-58135 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2025-13365.
When was CVE-2024-58135 published?
CVE-2024-58135 was published on 2025-05-03 and last updated on 2026-06-17.

References

Affected products (1)

More vulnerabilities in Mojolicious

All CVEs affecting Mojolicious →

Other CWE-338 vulnerabilities

Browse all CWE-338 vulnerabilities →