5.3medium
Mojolicious versions from 7.28 through 9.45 for Perl will generate weak HMAC session cookie secrets via "mojo generate app" by default
- Severity
- 5.3medium CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.58% (higher than 49% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- CPANSec
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Mojolicious | from 7.28 up to 9.45 | CVE List |
| mojolicious mojolicious | from 7.28 up to 9.40 | NVD |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
Las versiones de Mojolicious de la 7.28 a la 9.39 para Perl pueden generar secretos de sesión HMAC débiles. Al crear una aplicación predeterminada con la herramienta "mojo generate app", se escribe un secreto débil en el archivo de configuración de la aplicación mediante la función insegura rand(), que se utiliza para autenticar y proteger la integridad de las sesiones de la aplicación. Esto podría permitir a un atacante acceder por fuerza bruta a las claves de sesión de la aplicación.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-58135 changed 2026-06-05 | CVE Terms of Use |
| NVD | CVE-2024-58135 changed 2026-06-17 | Public domain |