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

Published May 3, 2025
·
Updated

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.

Affected Software

2 affected components
Mojolicious Mojolicious>=7.28<=9.40
Mojolicious Mojolicious Perl>=7.28<=9.40

Remediation

Information

Upgrade to version 9.46 and replace previously generated secrets.

Event History

May 3, 2025
CVE Published
via MITRE·10:16 AM
Data Sourced
via MITRE·10:16 AM
RemedyDescriptionWeakness
Data Sourced
via NVD·11:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-58135?

CVE-2024-58135 is considered a high severity vulnerability due to weak HMAC session secrets being generated.

2

How do I fix CVE-2024-58135?

To fix CVE-2024-58135, update your Mojolicious version to 9.40 or higher to ensure secure HMAC session secrets are used.

3

What versions are affected by CVE-2024-58135?

CVE-2024-58135 affects Mojolicious versions from 7.28 to 9.39 inclusive.

4

What is the main issue with CVE-2024-58135?

The main issue with CVE-2024-58135 is the generation of weak HMAC session secrets using the insecure rand() function.

5

How can weak HMAC secrets in CVE-2024-58135 impact my application?

Weak HMAC secrets may allow attackers to forge authentication tokens, potentially leading to unauthorized access.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203