CVE-2024-58135

Mojolicious versions from 7.28 through 9.40 for Perl may generate weak HMAC session secrets

Description

Mojolicious versions from 7.28 through 9.40 for Perl may generate weak HMAC session secrets. When creating a default app 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.

Remediation

Workaround:

  • 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.
  • As of version 9.39 of Mojolicious, if a CryptX distribution of version 0.080 or later is available in the include path before calling the "mojo generate app" tool, then a secure 1024 bit long secret will be generated.

Category

5.3
CVSS
Severity: Medium
CVSS 3.1 •
EPSS 0.04%
Affected: SRI Mojolicious
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2024-58135?
CVE-2024-58135 has been scored as a medium severity vulnerability.
How to fix CVE-2024-58135?
As a workaround for remediating CVE-2024-58135: 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.
Is CVE-2024-58135 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2024-58135 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2024-58135?
CVE-2024-58135 affects SRI Mojolicious.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.