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

MEDIUM
5.3
CVSS Score
Published: May 3, 2025 at 10:16 AM UTC
Updated: June 17, 2026 at 08:14 AM UTC
2 products affected across 2 vendorsMojoliciousMojolicious

Using Mojolicious by SRI?

Get instant alerts when new vulnerabilities affect Mojolicious - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.3
Exploit prediction
EPSS 0.6%
SSVC
PoC

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

7.28 ≤ v ≤ 9.40
7.28 ≤ v ≤ 9.457.28

References (13)

ExploitIssue TrackingPatch
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e
https://github.com/hashcat/hashcat/pull/4090
Issue TrackingExploitPatch
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e
https://github.com/mojolicious/mojo/pull/2200
RelatedProduct
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e
https://metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojo/Util.pm#L181
RelatedProduct
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e
https://perldoc.perl.org/functions/rand
RelatedTechnical Description
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e
https://security.metacpan.org/docs/guides/random-data-for-security.html

SSVC — Action Prioritization

SSVCPoCNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.3MEDIUMCISA-ADP
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
LOW
Integrity
NONE
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-338

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card