Mojolicious versions from 7.28 through 9.45 for Perl will generate weak HMAC session cookie secrets via "mojo generate app" by default

Summary

CVECVE-2024-58135
StatePUBLISHED
AssignerCPANSec
Source PriorityCVE Program / NVD first with legacy fallback
Published2025-05-03 11:15:48 UTC
Updated2026-06-05 14:16:31 UTC
DescriptionMojolicious 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.

Risk And Classification

Primary CVSS: v3.1 5.3 MEDIUM from ADP

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

EPSS: 0.006810000 probability, percentile 0.720880000 (date 2026-06-10)

Problem Types: CWE-338 | CWE-338 CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)


VersionSourceTypeScoreSeverityVector
3.1ADPDECLARED5.3MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
3.1134c704f-9b21-4f2e-91b3-4a467353bcc0Secondary5.3MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Mojolicious Mojolicious All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA SRI Mojolicious affected 7.28 9.45 custom Not specified

References

ReferenceSourceLinkTags
lists.debian.org/debian-perl/2025/05/msg00016.html 9b29abf9-4ab0-4765-b253-1875cd9b441e lists.debian.org
metacpan.org/release/SRI/Mojolicious-9.38/source/lib/Mojolicious/Command/A... 9b29abf9-4ab0-4765-b253-1875cd9b441e metacpan.org Product
perldoc.perl.org/functions/rand 9b29abf9-4ab0-4765-b253-1875cd9b441e perldoc.perl.org Product
metacpan.org/release/SRI/Mojolicious-9.46/source/Changes 9b29abf9-4ab0-4765-b253-1875cd9b441e metacpan.org
github.com/hashcat/hashcat/pull/4090 9b29abf9-4ab0-4765-b253-1875cd9b441e github.com Issue Tracking, Patch
metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojo/Util.pm 9b29abf9-4ab0-4765-b253-1875cd9b441e metacpan.org Product
lists.debian.org/debian-perl/2025/05/msg00017.html 9b29abf9-4ab0-4765-b253-1875cd9b441e lists.debian.org
github.com/mojolicious/mojo/commit/fb3733f92cc8a3344e6d615b3c7dac9d538ee... 9b29abf9-4ab0-4765-b253-1875cd9b441e github.com
lists.debian.org/debian-perl/2025/05/msg00018.html 9b29abf9-4ab0-4765-b253-1875cd9b441e lists.debian.org
security.metacpan.org/docs/guides/random-data-for-security.html 9b29abf9-4ab0-4765-b253-1875cd9b441e security.metacpan.org Technical Description
github.com/mojolicious/mojo/commit/789cfa43f9118852b38cbd1fd0a2596bcb982... 9b29abf9-4ab0-4765-b253-1875cd9b441e github.com
github.com/mojolicious/mojo/pull/2200 9b29abf9-4ab0-4765-b253-1875cd9b441e github.com Exploit, Issue Tracking, Patch
metacpan.org/release/SRI/Mojolicious-7.28/source/lib/Mojolicious/Command/g... 9b29abf9-4ab0-4765-b253-1875cd9b441e metacpan.org Product
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Additional Advisory Data

Solutions

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

Workarounds

CNA: 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.

CNA: As of version 9.39 of Mojolicious, if the optional CryptX distribution 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.

© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report