BREW-ABCDE-CVE-2024-58135 (CVE-2024-58135)
Vulnerability from osv_homebrew – Published: 2026-08-13 09:10 – Updated: 2026-08-13 09:10 – Source websiteMojolicious 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.
{
"affected": [
{
"ecosystem_specific": {
"fix": null,
"range_state": "affected",
"resource": "Mojo::Base",
"resource_purl": "pkg:cpan/SRI/Mojolicious@8.64"
},
"package": {
"ecosystem": "Homebrew",
"name": "abcde",
"purl": "pkg:brew/abcde"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "medium",
"source": "matched",
"strategy": "cpansa",
"upstream_evidence": [
{
"ecosystem": "CPAN",
"key": "pkg:cpan/SRI/Mojolicious@8.64",
"name": "Mojolicious",
"resource": "Mojo::Base",
"strategy": "cpansa",
"subject_version": "8.64"
}
]
},
"details": "Mojolicious versions from 7.28 through 9.45 for Perl will generate weak HMAC session cookie secrets via \"mojo generate app\" by default.\n\nWhen creating a default app skeleton with the \"mojo generate app\" tool, a weak secret is written to the application\u0027s configuration file using the insecure rand() function, and used for authenticating and protecting the integrity of the application\u0027s sessions. This may allow an attacker to brute force the application\u0027s session keys.\n\nRelease 9.46 fixes the issue by providing high quality randomness, even in absence of CryptX.\n\nUsers 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.",
"id": "BREW-abcde-CVE-2024-58135",
"modified": "2026-08-13T09:10:09Z",
"published": "2026-08-13T09:10:09Z",
"references": [
{
"type": "WEB",
"url": "https://cpan.org/modules"
},
{
"type": "WEB",
"url": "https://metacpan.org/release/SRI/Mojolicious-7.28/source/lib/Mojolicious/Command/generate/app.pm#L220"
},
{
"type": "WEB",
"url": "https://metacpan.org/release/SRI/Mojolicious-9.38/source/lib/Mojolicious/Command/Author/generate/app.pm#L202"
},
{
"type": "WEB",
"url": "https://metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojo/Util.pm#L181"
},
{
"type": "WEB",
"url": "https://perldoc.perl.org/functions/rand"
},
{
"type": "ADVISORY",
"url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/58xxx/CVE-2024-58135.json"
},
{
"type": "ADVISORY",
"url": "https://metacpan.org/release/SRI/Mojolicious-9.46/source/Changes"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-58135"
},
{
"type": "REPORT",
"url": "https://github.com/mojolicious/mojo/pull/2200"
},
{
"type": "FIX",
"url": "https://github.com/mojolicious/mojo/commit/789cfa43f9118852b38cbd1fd0a2596bcb9821ea.patch"
},
{
"type": "FIX",
"url": "https://github.com/mojolicious/mojo/commit/fb3733f92cc8a3344e6d615b3c7dac9d538eeab0.patch"
},
{
"type": "PACKAGE",
"url": "https://github.com/mojolicious/mojo"
},
{
"type": "ARTICLE",
"url": "https://lists.debian.org/debian-perl/2025/05/msg00016.html"
},
{
"type": "ARTICLE",
"url": "https://lists.debian.org/debian-perl/2025/05/msg00017.html"
},
{
"type": "ARTICLE",
"url": "https://lists.debian.org/debian-perl/2025/05/msg00018.html"
},
{
"type": "ARTICLE",
"url": "https://security.metacpan.org/docs/guides/random-data-for-security.html"
},
{
"type": "EVIDENCE",
"url": "https://github.com/hashcat/hashcat/pull/4090"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Mojolicious versions from 7.28 through 9.45 for Perl will generate weak HMAC session cookie secrets via \"mojo generate app\" by default",
"upstream": [
"CVE-2024-58135"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.