CVEfocus › CVE database › CVE-2024-58135

CVE-2024-58135Mojolicious versions from 7.28 through 9.45 for Perl will generate weak HMAC session…

CVSS 5.3 MediumEPSS 1.0% (higher than 61% of CVEs)Published 2025-05-03Updated 2026-06-05Assigner: CPANSec

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.

CWE-338

What to do

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

7Fix pending
3Under investigation
1Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10libmojolicious-perlFix pendingUBUNTU-CVE-2024-58135
Ubuntu 26.04libmojolicious-perlUnder investigationUBUNTU-CVE-2024-58135
Ubuntu 25.10libmojolicious-perlWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2024-58135
Ubuntu 24.04libmojolicious-perlUnder investigationUBUNTU-CVE-2024-58135
Ubuntu 22.04libmojolicious-perlUnder investigationUBUNTU-CVE-2024-58135
Ubuntu 20.04libmojolicious-perlFix pendingUBUNTU-CVE-2024-58135
Ubuntu 18.04libmojolicious-perlFix pendingUBUNTU-CVE-2024-58135
Ubuntu 16.04libmojolicious-perlFix pendingUBUNTU-CVE-2024-58135
Debian 14libmojolicious-perlFix pendingDEBIAN-CVE-2024-58135
Debian 13libmojolicious-perlFix pendingDEBIAN-CVE-2024-58135
Debian 12libmojolicious-perlFix pendingDEBIAN-CVE-2024-58135

What the vendor says

As published in the CVE record by CPANSec, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Solution: Upgrade to version 9.46 and replace previously generated secrets.

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.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.