{"id":"CVE-2024-58135","aliases":["AZL-61741","AZL-61822","DEBIAN-CVE-2024-58135","EUVD-2025-13365","GHSA-3r5v-gmfp-3mh9","UBUNTU-CVE-2024-58135"],"status":"published","title":"Mojolicious versions from 7.28 through 9.45 for Perl will generate weak HMAC session cookie secrets via \"mojo generate app\" by default","description":"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'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.\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.","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"adp","from":"cve"},"epss":{"day":"2026-11-11","score":0.00572,"percentile":0.47769,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-338"],"published":"2025-05-03T10:16:10Z","modified":"2026-11-05T05:36:30Z","affected":[{"source":"osv","ecosystem":"Azure Linux:2","package":"perl-Mojolicious","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"8.57-3"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"perl-Mojolicious","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"8.57-3"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"libmojolicious-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.31+dfsg-1","9.33+dfsg-1","9.34+dfsg-1","9.35+dfsg-1","9.36+dfsg-1","9.36+dfsg-1~bpo12+2","9.37+dfsg-1","9.37+dfsg-2","9.37+dfsg-2~bpo12+1","9.38+dfsg-1","9.39+dfsg-1","9.42+dfsg-1","9.42+dfsg-1~bpo13+2","9.45+dfsg-1","9.45+dfsg-2","9.46+dfsg-1","9.47+dfsg-1","9.48+dfsg-1","9.49+dfsg-1","9.53+dfsg-1"]},{"source":"osv","ecosystem":"Debian:13","package":"libmojolicious-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.39+dfsg-1","9.42+dfsg-1","9.42+dfsg-1~bpo13+2","9.45+dfsg-1","9.45+dfsg-2","9.46+dfsg-1","9.47+dfsg-1","9.48+dfsg-1","9.49+dfsg-1","9.53+dfsg-1"]},{"source":"osv","ecosystem":"Debian:14","package":"libmojolicious-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.39+dfsg-1","9.42+dfsg-1","9.42+dfsg-1~bpo13+2","9.45+dfsg-1","9.45+dfsg-2","9.46+dfsg-1","9.47+dfsg-1","9.48+dfsg-1","9.49+dfsg-1","9.53+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"libmojolicious-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.15+dfsg-1","6.15+dfsg-1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"libmojolicious-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["7.39+dfsg-1ubuntu1","7.43+dfsg-1ubuntu1","7.57+dfsg-1ubuntu1","7.59+dfsg-1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"libmojolicious-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.22+dfsg-1","8.23+dfsg-1","8.26+dfsg-1","8.27+dfsg-1","8.32+dfsg-1","8.33+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"libmojolicious-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.71+dfsg-1","9.22+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"libmojolicious-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.33+dfsg-1","9.35+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"libmojolicious-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.39+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"libmojolicious-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.42+dfsg-1","9.45+dfsg-2","9.46+dfsg-1","9.48+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"libmojolicious-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.39+dfsg-1","9.42+dfsg-1"]}],"products":[{"vendor":"mojolicious","product":"mojolicious"},{"vendor":"sri","product":"mojolicious"}],"references":[{"url":"https://perldoc.perl.org/functions/rand","tags":["related","Product","web","report"]},{"url":"https://metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojo/Util.pm#L181","tags":["related","Product","web","report"]},{"url":"https://metacpan.org/release/SRI/Mojolicious-9.38/source/lib/Mojolicious/Command/Author/generate/app.pm#L202","tags":["related","Product","web","report"]},{"url":"https://github.com/mojolicious/mojo/pull/2200","tags":["issue-tracking","Exploit","Issue Tracking","Patch","report"]},{"url":"https://metacpan.org/release/SRI/Mojolicious-7.28/source/lib/Mojolicious/Command/generate/app.pm#L220","tags":["related","Product","web","report"]},{"url":"https://security.metacpan.org/docs/guides/random-data-for-security.html","tags":["technical-description","Technical Description","article","report"]},{"url":"https://github.com/hashcat/hashcat/pull/4090","tags":["exploit","Issue Tracking","Patch","evidence","report"]},{"url":"https://lists.debian.org/debian-perl/2025/05/msg00016.html","tags":["mailing-list","article"]},{"url":"https://lists.debian.org/debian-perl/2025/05/msg00017.html","tags":["mailing-list","article"]},{"url":"https://lists.debian.org/debian-perl/2025/05/msg00018.html","tags":["mailing-list","article"]},{"url":"https://metacpan.org/release/SRI/Mojolicious-9.46/source/Changes","tags":["release-notes","advisory"]},{"url":"https://github.com/mojolicious/mojo/commit/fb3733f92cc8a3344e6d615b3c7dac9d538eeab0.patch","tags":["patch","fix"]},{"url":"https://github.com/mojolicious/mojo/commit/789cfa43f9118852b38cbd1fd0a2596bcb9821ea.patch","tags":["patch","fix"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-58135","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-3r5v-gmfp-3mh9"},{"url":"https://cpan.org/modules","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/58xxx/CVE-2024-58135.json","tags":["advisory"]},{"url":"https://github.com/mojolicious/mojo","tags":["package"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2024-58135","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2024-58135","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-58135","tags":["report"]},{"url":"https://lists.security.metacpan.org/cve-announce/msg/29241187/","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2024-58135","title":"Mojolicious versions from 7.28 through 9.45 for Perl will generate weak HMAC session cookie secrets via \"mojo generate app\" by default","description":"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'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.\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.","status":"published","published":"2025-05-03T10:16:10.636Z","modified":"2026-06-05T12:37:53.344Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"adp"}],"cwes":["CWE-338","CWE-338"],"updated_at":"2026-11-02T14:34:08.843708Z"}],"euvd":[{"id":"EUVD-2025-13365","description":"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'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.\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.","status":"published","published":"2025-05-03T10:16:10Z","modified":"2026-06-05T12:37:53Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T18:20:51.774493Z"}],"ghsa":[{"id":"GHSA-3r5v-gmfp-3mh9","title":"Mojolicious versions from 7.28 through 9.39 for Perl may generate weak HMAC session secrets.\n...","description":"Mojolicious versions from 7.28 through 9.39 for Perl may generate weak HMAC session secrets.\n\nWhen 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.","status":"published","published":"2025-05-03T12:30:25Z","modified":"2026-06-05T15:32:04Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-338"],"updated_at":"2026-11-02T15:08:34.365209Z"}],"nvd":[{"id":"CVE-2024-58135","description":"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'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.\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.","status":"published","published":"2025-05-03T11:15:48.037Z","modified":"2026-06-17T08:14:41.497Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-338"],"updated_at":"2026-11-02T14:10:46.40251Z"}],"osv":[{"id":"CVE-2024-58135","title":"Mojolicious versions from 7.28 through 9.45 for Perl will generate weak HMAC session cookie secrets via \"mojo generate app\" by default","description":"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'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.\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.","status":"published","published":"2025-05-03T10:16:10.636Z","modified":"2026-10-28T02:30:31.406562629Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-338"],"updated_at":"2026-11-02T15:44:45.107804Z"},{"id":"DEBIAN-CVE-2024-58135","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.","status":"published","published":"2025-05-03T11:15:48.037Z","modified":"2026-11-02T12:03:12.022232268Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:44.747956Z"},{"id":"UBUNTU-CVE-2024-58135","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.","status":"published","published":"2025-05-03T11:15:00Z","modified":"2026-10-28T20:15:16.773892044Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T16:55:18.664792Z"},{"id":"AZL-61741","title":"CVE-2024-58135 affecting package perl-Mojolicious 8.57-3","description":"Mojolicious versions from 7.28 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'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.","status":"published","published":"2025-05-03T11:15:48Z","modified":"2026-04-21T04:31:49.148242Z","updated_at":"2026-11-02T15:28:07.805289Z"},{"id":"AZL-61822","title":"CVE-2024-58135 affecting package perl-Mojolicious 8.57-3","description":"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'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.\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.","status":"published","published":"2025-05-03T11:15:48Z","modified":"2026-11-05T05:36:30Z","updated_at":"2026-11-05T16:41:21.518778Z"}]}}
