Description
Mojolicious versions from 0.999922 for Perl uses a hard coded string, or the application's class name, as an HMAC session cookie secret by default. These predictable default secrets can be exploited by an attacker to forge session cookies. An attacker who knows or guesses the secret could compute valid HMAC signatures for the session cookie, allowing them to tamper with or hijack another user’s session.
Problem types
CWE-321 Use of Hard-coded Cryptographic Key
Product status
0.999922 (custom)
Credits
Antoine Cervoise from Synacktiv
Jakub Kramarz
Lukas Atkinson
References
github.com/mojolicious/mojo/pull/1791
github.com/mojolicious/mojo/pull/2200
www.synacktiv.com/publications/baking-mojolicious-cookies
medium.com/...rity-problems-through-security-by-13da7c225802
metacpan.org/...I/Mojolicious-9.39/source/lib/Mojolicious.pm
github.com/hashcat/hashcat/pull/4090
lists.debian.org/debian-perl/2025/05/msg00016.html
lists.debian.org/debian-perl/2025/05/msg00017.html
lists.debian.org/debian-perl/2025/05/msg00018.html
github.com/mojolicious/mojo/pull/2252
docs.mojolicious.org/Mojolicious/Guides/FAQ