Skip to main content
Public proof of conceptFix available

CVE-2024-58135

A public proof of concept exists; no exploitation attested.

  • Published2025-05-03
  • WeaknessCWE-338

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

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.

Timeline

dates in UTC
  1. 2025-05-0311:15CVE publishedNVD

Versions per branch

NVD
Mojolicious
BranchAffectedFixed in
9.40≥ 7.28, ≤ 9.40no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As CPANSec, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • SRI Mojoliciousother versions: not affected

    package Mojolicioushttps://cpan.org/modules

    Affected
    • ≥ 7.28, ≤ 9.45no fix statedcustom

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2026-06-05

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • libmojolicious-perlUbuntu:Pro:20.04:LTSall versions · no fixed version listed
  • libmojolicious-perlUbuntu:Pro:18.04:LTSall versions · no fixed version listed
  • libmojolicious-perlUbuntu:Pro:16.04:LTSall versions · no fixed version listed
  • libmojolicious-perlUbuntu:26.10all versions · no fixed version listed
  • libmojolicious-perlUbuntu:26.04:LTSall versions · no fixed version listed
  • libmojolicious-perlUbuntu:25.10all versions · no fixed version listed
  • libmojolicious-perlUbuntu:24.04:LTSall versions · no fixed version listed
  • libmojolicious-perlUbuntu:22.04:LTSall versions · no fixed version listed

5 more package ranges on OSV.dev

Vendor advisories

  • CVE-2024-58135 Red Hat Product Security

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

Full record on NVD

Fix

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Published
2025-05-03
Last modified
2026-06-17
NVD status
Modified
GitHub advisory
GHSA-3r5v-gmfp-3mh9

Frequently asked questions

What is 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. 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.

Is CVE-2024-58135 actively exploited?

A proof-of-concept exploit exists for CVE-2024-58135, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2024-58135?

CVE-2024-58135 has a CVSS v3 base score of 5.3 (Medium severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.

Running Mojolicious? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record