{ "document": { "category": "csaf_security_advisory", "csaf_version": "2.0", "distribution": { "tlp": { "label": "WHITE", "url": "https://www.first.org/tlp/" } }, "lang": "en", "notes": [ { "category": "description", "text": "Mojolicious versions from 7.28 for Perl may generate weak HMAC session secrets. When 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.", "title": "Vulnerability Description" } ], "publisher": { "category": "other", "contact_details": "gdt@cpan.org", "name": "giterlizzi", "namespace": "https://github.com/giterlizzi/" }, "references": [ { "category": "self", "summary": "CPANSA-Mojolicious-2024-58135 JSON", "url": "https://raw.githubusercontent.com/giterlizzi/perl-CPANSA-CSAF/develop/csaf/white/2025/cpansa-mojolicious-2024-58135.json" }, { "category": "external", "summary": "https://github.com/hashcat/hashcat/pull/4090", "url": "https://github.com/hashcat/hashcat/pull/4090" }, { "category": "external", "summary": "https://github.com/mojolicious/mojo/pull/2200", "url": "https://github.com/mojolicious/mojo/pull/2200" }, { "category": "external", "summary": "https://metacpan.org/release/SRI/Mojolicious-7.28/source/lib/Mojolicious/Command/generate/app.pm#L220", "url": "https://metacpan.org/release/SRI/Mojolicious-7.28/source/lib/Mojolicious/Command/generate/app.pm#L220" }, { "category": "external", "summary": "https://metacpan.org/release/SRI/Mojolicious-9.38/source/lib/Mojolicious/Command/Author/generate/app.pm#L202", "url": "https://metacpan.org/release/SRI/Mojolicious-9.38/source/lib/Mojolicious/Command/Author/generate/app.pm#L202" }, { "category": "external", "summary": "https://metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojo/Util.pm#L181", "url": "https://metacpan.org/release/SRI/Mojolicious-9.39/source/lib/Mojo/Util.pm#L181" }, { "category": "external", "summary": "https://perldoc.perl.org/functions/rand", "url": "https://perldoc.perl.org/functions/rand" }, { "category": "external", "summary": "https://security.metacpan.org/docs/guides/random-data-for-security.html", "url": "https://security.metacpan.org/docs/guides/random-data-for-security.html" }, { "category": "external", "summary": "CVE-2024-58135 (NVD)", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-58135" } ], "title": "Mojolicious vulnerability", "tracking": { "current_release_date": "2025-05-03T00:00:00", "generator": { "engine": { "name": "CSAF Perl Toolkit", "version": "0.26" } }, "id": "CPANSA-Mojolicious-2024-58135", "initial_release_date": "2025-05-03T00:00:00", "revision_history": [ { "date": "2025-05-03T00:00:00", "number": "1", "summary": "First release" } ], "status": "final", "version": "1" } }, "product_tree": { "branches": [ { "branches": [ { "category": "product_version_range", "name": "vers:cpan/>=7.28", "product": { "name": "Mojolicious greater than or equal 7.28", "product_id": "CSAFPID-0001" } } ], "category": "product_name", "name": "Mojolicious" } ] }, "vulnerabilities": [ { "cve": "CVE-2024-58135", "cwe": { "id": "CWE-338", "name": "Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)" }, "notes": [ { "category": "description", "text": "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.", "title": "Vulnerability Description" } ], "product_status": { "known_affected": [ "CSAFPID-0001" ] }, "scores": [ { "cvss_v3": { "baseScore": 5.3, "baseSeverity": "MEDIUM", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N", "version": "3.1" }, "products": [ "CSAFPID-0001" ] } ] } ] }