CVE-2024-58135
Mojolicious vulnerability
Mojolicious versions from 7.28 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.
Affected products
Mojolicious. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Mojolicious runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/hashcat/hashcat/pull/4090 · Patch
- github.com/mojolicious/mojo/pull/2200 · Exploit
- lists.debian.org/debian-perl/2025/05/msg00016.html
- lists.debian.org/debian-perl/2025/05/msg00017.html
- lists.debian.org/debian-perl/2025/05/msg00018.html
- metacpan.org/release/SRI/Mojolicious-7.28/source/lib/Mojolicious/Command/generate/app.pm#L
- metacpan.org/release/SRI/Mojolicious-9.38/source/lib/Mojolicious/Command/Author/generate/a
- metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojo/Util.pm#L181
- nvd.nist.gov/vuln/detail/CVE-2024-58135
- cve.org/CVERecord?id=CVE-2024-58135
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.