FKIE_CVE-2024-58135
Vulnerability from fkie_nvd - Published: 2025-05-03 11:15 - Updated: 2026-06-17 08:14
Severity
Summary
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.
References
Impacted products
| Vendor | Product | Version | |
|---|---|---|---|
| mojolicious | mojolicious | * |
{
"affected": [
{
"affectedData": [
{
"collectionURL": "https://cpan.org/modules",
"defaultStatus": "unaffected",
"packageName": "Mojolicious",
"product": "Mojolicious",
"programFiles": [
"lib/Mojolicious/Command/Author/generate/app.pm",
"lib/Mojo/Util.pm",
"lib/Mojolicious/Command/generate/app.pm"
],
"programRoutines": [
{
"name": "Mojolicious::Command::Author::generate::app::run()"
},
{
"name": "Mojo::Util::generate_secret()"
}
],
"repo": "https://github.com/mojolicious/mojo",
"vendor": "SRI",
"versions": [
{
"lessThanOrEqual": "9.45",
"status": "affected",
"version": "7.28",
"versionType": "custom"
}
]
}
],
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
}
],
"configurations": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:a:mojolicious:mojolicious:*:*:*:*:*:perl:*:*",
"matchCriteriaId": "18CB7F71-95D5-44DC-BD63-01394CC408B4",
"versionEndIncluding": "9.40",
"versionStartIncluding": "7.28",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "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."
},
{
"lang": "es",
"value": "Las versiones de Mojolicious de la 7.28 a la 9.39 para Perl pueden generar secretos de sesi\u00f3n HMAC d\u00e9biles. Al crear una aplicaci\u00f3n predeterminada con la herramienta \"mojo generate app\", se escribe un secreto d\u00e9bil en el archivo de configuraci\u00f3n de la aplicaci\u00f3n mediante la funci\u00f3n insegura rand(), que se utiliza para autenticar y proteger la integridad de las sesiones de la aplicaci\u00f3n. Esto podr\u00eda permitir a un atacante acceder por fuerza bruta a las claves de sesi\u00f3n de la aplicaci\u00f3n."
}
],
"id": "CVE-2024-58135",
"lastModified": "2026-06-17T08:14:41.497",
"metrics": {
"cvssMetricV31": [
{
"cvssData": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "NONE",
"baseScore": 5.3,
"baseSeverity": "MEDIUM",
"confidentialityImpact": "LOW",
"integrityImpact": "NONE",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
"version": "3.1"
},
"exploitabilityScore": 3.9,
"impactScore": 1.4,
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"type": "Secondary"
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2024-58135",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2025-05-05T17:58:51.652027Z",
"version": "2.0.3"
}
}
]
},
"published": "2025-05-03T11:15:48.037",
"references": [
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"tags": [
"Issue Tracking",
"Patch"
],
"url": "https://github.com/hashcat/hashcat/pull/4090"
},
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"url": "https://github.com/mojolicious/mojo/commit/789cfa43f9118852b38cbd1fd0a2596bcb9821ea.patch"
},
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"url": "https://github.com/mojolicious/mojo/commit/fb3733f92cc8a3344e6d615b3c7dac9d538eeab0.patch"
},
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"tags": [
"Exploit",
"Issue Tracking",
"Patch"
],
"url": "https://github.com/mojolicious/mojo/pull/2200"
},
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"url": "https://lists.debian.org/debian-perl/2025/05/msg00016.html"
},
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"url": "https://lists.debian.org/debian-perl/2025/05/msg00017.html"
},
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"url": "https://lists.debian.org/debian-perl/2025/05/msg00018.html"
},
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"tags": [
"Product"
],
"url": "https://metacpan.org/release/SRI/Mojolicious-7.28/source/lib/Mojolicious/Command/generate/app.pm#L220"
},
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"tags": [
"Product"
],
"url": "https://metacpan.org/release/SRI/Mojolicious-9.38/source/lib/Mojolicious/Command/Author/generate/app.pm#L202"
},
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"tags": [
"Product"
],
"url": "https://metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojo/Util.pm#L181"
},
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"url": "https://metacpan.org/release/SRI/Mojolicious-9.46/source/Changes"
},
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"tags": [
"Product"
],
"url": "https://perldoc.perl.org/functions/rand"
},
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"tags": [
"Technical Description"
],
"url": "https://security.metacpan.org/docs/guides/random-data-for-security.html"
}
],
"sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"vulnStatus": "Modified",
"weaknesses": [
{
"description": [
{
"lang": "en",
"value": "CWE-338"
}
],
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"type": "Secondary"
},
{
"description": [
{
"lang": "en",
"value": "CWE-338"
}
],
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"type": "Secondary"
}
]
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
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.
Loading…
Loading…