Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-58134: CWE-321 Use of Hard-coded Cryptographic Key in SRI Mojolicious

0
High
VulnerabilityCVE-2024-58134cvecve-2024-58134cwe-321cwe-331
Published: Sat May 03 2025 (05/03/2025, 16:08:55 UTC)
Source: CVE
Vendor/Project: SRI
Product: Mojolicious

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.

AI-Powered Analysis

AILast updated: 10/20/2025, 20:46:17 UTC

Technical Analysis

CVE-2024-58134 identifies a critical security flaw in Mojolicious version 0.999922, a Perl web framework developed by SRI. The vulnerability arises from the use of a hard-coded cryptographic key or the application's class name as the default HMAC secret for signing session cookies. HMAC (Hash-based Message Authentication Code) is used to ensure the integrity and authenticity of session cookies. However, when the secret key is predictable or hard-coded, attackers can compute valid HMAC signatures without knowledge of a secret key, enabling them to forge or tamper with session cookies. This allows attackers to impersonate legitimate users, hijack sessions, or escalate privileges within the affected web application. The vulnerability requires network access and low privileges but no user interaction, making it exploitable remotely by unauthenticated attackers who can guess or know the default secret. The flaw is categorized under CWE-321 (Use of Hard-coded Cryptographic Key) and CWE-331 (Insufficient Entropy). The CVSS v3.1 score of 8.1 reflects high impact on confidentiality and integrity, with no impact on availability. No patches or exploits are currently reported, but the risk remains significant due to the ease of exploitation and potential for session hijacking. The vulnerability affects only Mojolicious version 0.999922, and mitigation involves replacing default secrets with strong, unique keys or upgrading to a fixed version once released. This issue highlights the critical importance of secure key management in web frameworks to prevent session-related attacks.

Potential Impact

For European organizations, the impact of CVE-2024-58134 can be substantial, particularly for those relying on Mojolicious-based web applications for internal or customer-facing services. Successful exploitation allows attackers to forge session cookies, leading to unauthorized access to user accounts, data leakage, and potential privilege escalation. This compromises confidentiality and integrity of sensitive information and can disrupt business operations by undermining trust in web applications. Organizations in sectors such as finance, healthcare, government, and e-commerce are especially vulnerable due to the sensitive nature of their data and regulatory requirements like GDPR. The vulnerability's remote exploitability without user interaction increases the attack surface, making it attractive for attackers targeting European entities. Additionally, session hijacking can facilitate further lateral movement within networks, amplifying the risk of broader compromise. The absence of known exploits in the wild provides a window for proactive mitigation, but the high CVSS score underscores the urgency for European organizations to address this flaw promptly.

Mitigation Recommendations

1. Immediately audit all Mojolicious applications to identify usage of version 0.999922 or any instance relying on default HMAC secrets. 2. Replace the default hard-coded HMAC session cookie secret with a strong, randomly generated cryptographic key unique per deployment. Avoid using predictable strings such as application class names. 3. Monitor official Mojolicious channels for patches or updated versions addressing this vulnerability and plan prompt upgrades once available. 4. Implement strict access controls and network segmentation to limit exposure of vulnerable applications to untrusted networks. 5. Enable comprehensive logging and monitoring of session activity to detect anomalies indicative of session forgery or hijacking attempts. 6. Educate developers and DevOps teams on secure key management practices and the risks of hard-coded secrets. 7. Consider deploying Web Application Firewalls (WAFs) with rules to detect and block suspicious session cookie manipulations. 8. Conduct penetration testing focused on session management to validate the effectiveness of mitigations. 9. For critical applications, consider multi-factor authentication to reduce the impact of session compromise. 10. Review and update incident response plans to include scenarios involving session hijacking attacks.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
CPANSec
Date Reserved
2025-04-07T16:06:37.226Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9816c4522896dcbd6a12

Added to database: 5/21/2025, 9:08:38 AM

Last enriched: 10/20/2025, 8:46:17 PM

Last updated: 11/22/2025, 7:34:39 PM

Views: 36

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats