CVE-2024-56145: CWE-94: Improper Control of Generation of Code ('Code Injection') in craftcms cms
Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond. Users of affected versions are affected by this vulnerability if their php.ini configuration has `register_argc_argv` enabled. For these users an unspecified remote code execution vector is present. Users are advised to update to version 3.9.14, 4.13.2, or 5.5.2. Users unable to upgrade should disable `register_argc_argv` to mitigate the issue.
AI Analysis
Technical Summary
CVE-2024-56145 is a critical vulnerability in Craft CMS, a popular content management system used for building custom digital experiences. The vulnerability is classified under CWE-94, indicating improper control over code generation, which in this case manifests as a code injection flaw. This vulnerability specifically affects Craft CMS versions 3.0.0 up to but not including 3.9.14, versions from 4.0.0-RC1 up to 4.13.2, and versions from 5.0.0-RC1 up to 5.5.2. The root cause is tied to the PHP configuration directive 'register_argc_argv' being enabled in the php.ini file. When enabled, this setting allows PHP scripts to access command-line arguments, which can be manipulated by attackers to inject and execute arbitrary PHP code remotely without any authentication or user interaction. The vulnerability enables a remote attacker to execute arbitrary code on the affected server, potentially leading to full system compromise, data theft, or service disruption. The CVSS 4.0 score of 9.3 reflects the vulnerability's critical nature, with network attack vector, low attack complexity, no privileges required, and no user interaction needed. The vulnerability does not require any prior authentication, making it highly exploitable. Although no known exploits have been reported in the wild yet, the severity and ease of exploitation make it a high priority for patching. The recommended remediation is to upgrade Craft CMS to versions 3.9.14, 4.13.2, or 5.5.2, which contain fixes for this issue. For users unable to upgrade immediately, disabling the 'register_argc_argv' directive in PHP configuration serves as a temporary mitigation to prevent exploitation.
Potential Impact
For European organizations, the impact of CVE-2024-56145 can be severe. Craft CMS is used by various businesses, including media, e-commerce, and government websites, to manage digital content. Successful exploitation allows attackers to execute arbitrary code remotely, potentially leading to complete system takeover, data breaches, defacement, or ransomware deployment. This can result in significant operational disruption, financial loss, reputational damage, and regulatory penalties under GDPR due to compromised personal data. The vulnerability's ease of exploitation and lack of authentication requirements increase the risk of widespread attacks, especially against organizations with default or misconfigured PHP settings. Critical infrastructure and public sector entities using Craft CMS are particularly at risk, as attackers may leverage this vulnerability for espionage or sabotage. The absence of known exploits in the wild currently provides a window for proactive mitigation, but the threat landscape could rapidly evolve given the vulnerability's severity.
Mitigation Recommendations
1. Immediate upgrade of Craft CMS to versions 3.9.14, 4.13.2, or 5.5.2 is the most effective mitigation to fully remediate the vulnerability. 2. For organizations unable to upgrade promptly, disable the 'register_argc_argv' directive in the php.ini configuration file to prevent exploitation. This can be done by setting 'register_argc_argv = Off' and restarting the web server. 3. Conduct a thorough audit of PHP configurations across all servers hosting Craft CMS to ensure 'register_argc_argv' is disabled if patching is delayed. 4. Implement network-level protections such as web application firewalls (WAFs) with custom rules to detect and block suspicious payloads targeting Craft CMS endpoints. 5. Monitor logs for unusual command-line argument usage or unexpected PHP execution patterns that could indicate exploitation attempts. 6. Restrict access to administrative interfaces and sensitive endpoints using IP whitelisting or VPNs to reduce exposure. 7. Regularly back up CMS data and server configurations to enable rapid recovery in case of compromise. 8. Educate development and operations teams about the risks associated with PHP configuration settings and the importance of timely patching.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Sweden, Belgium, Poland, Austria
CVE-2024-56145: CWE-94: Improper Control of Generation of Code ('Code Injection') in craftcms cms
Description
Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond. Users of affected versions are affected by this vulnerability if their php.ini configuration has `register_argc_argv` enabled. For these users an unspecified remote code execution vector is present. Users are advised to update to version 3.9.14, 4.13.2, or 5.5.2. Users unable to upgrade should disable `register_argc_argv` to mitigate the issue.
AI-Powered Analysis
Technical Analysis
CVE-2024-56145 is a critical vulnerability in Craft CMS, a popular content management system used for building custom digital experiences. The vulnerability is classified under CWE-94, indicating improper control over code generation, which in this case manifests as a code injection flaw. This vulnerability specifically affects Craft CMS versions 3.0.0 up to but not including 3.9.14, versions from 4.0.0-RC1 up to 4.13.2, and versions from 5.0.0-RC1 up to 5.5.2. The root cause is tied to the PHP configuration directive 'register_argc_argv' being enabled in the php.ini file. When enabled, this setting allows PHP scripts to access command-line arguments, which can be manipulated by attackers to inject and execute arbitrary PHP code remotely without any authentication or user interaction. The vulnerability enables a remote attacker to execute arbitrary code on the affected server, potentially leading to full system compromise, data theft, or service disruption. The CVSS 4.0 score of 9.3 reflects the vulnerability's critical nature, with network attack vector, low attack complexity, no privileges required, and no user interaction needed. The vulnerability does not require any prior authentication, making it highly exploitable. Although no known exploits have been reported in the wild yet, the severity and ease of exploitation make it a high priority for patching. The recommended remediation is to upgrade Craft CMS to versions 3.9.14, 4.13.2, or 5.5.2, which contain fixes for this issue. For users unable to upgrade immediately, disabling the 'register_argc_argv' directive in PHP configuration serves as a temporary mitigation to prevent exploitation.
Potential Impact
For European organizations, the impact of CVE-2024-56145 can be severe. Craft CMS is used by various businesses, including media, e-commerce, and government websites, to manage digital content. Successful exploitation allows attackers to execute arbitrary code remotely, potentially leading to complete system takeover, data breaches, defacement, or ransomware deployment. This can result in significant operational disruption, financial loss, reputational damage, and regulatory penalties under GDPR due to compromised personal data. The vulnerability's ease of exploitation and lack of authentication requirements increase the risk of widespread attacks, especially against organizations with default or misconfigured PHP settings. Critical infrastructure and public sector entities using Craft CMS are particularly at risk, as attackers may leverage this vulnerability for espionage or sabotage. The absence of known exploits in the wild currently provides a window for proactive mitigation, but the threat landscape could rapidly evolve given the vulnerability's severity.
Mitigation Recommendations
1. Immediate upgrade of Craft CMS to versions 3.9.14, 4.13.2, or 5.5.2 is the most effective mitigation to fully remediate the vulnerability. 2. For organizations unable to upgrade promptly, disable the 'register_argc_argv' directive in the php.ini configuration file to prevent exploitation. This can be done by setting 'register_argc_argv = Off' and restarting the web server. 3. Conduct a thorough audit of PHP configurations across all servers hosting Craft CMS to ensure 'register_argc_argv' is disabled if patching is delayed. 4. Implement network-level protections such as web application firewalls (WAFs) with custom rules to detect and block suspicious payloads targeting Craft CMS endpoints. 5. Monitor logs for unusual command-line argument usage or unexpected PHP execution patterns that could indicate exploitation attempts. 6. Restrict access to administrative interfaces and sensitive endpoints using IP whitelisting or VPNs to reduce exposure. 7. Regularly back up CMS data and server configurations to enable rapid recovery in case of compromise. 8. Educate development and operations teams about the risks associated with PHP configuration settings and the importance of timely patching.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2024-12-16T18:04:39.983Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6839b29a182aa0cae2b1bcf1
Added to database: 5/30/2025, 1:28:58 PM
Last enriched: 10/21/2025, 7:58:41 PM
Last updated: 12/4/2025, 8:54:39 PM
Views: 33
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-66573: CWE-319 Cleartext Transmission of Sensitive Information in mersive Solstice Pod API Session Key Extraction via API Endpoint
MediumCVE-2025-66572: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in loadedcommerce Loaded Commerce
MediumCVE-2025-66571: CWE-502: Deserialization of Untrusted Data in UNA CMS
CriticalCVE-2025-66555: CWE-306: Missing Authentication for Critical Function in airkeyboardapp AirKeyboard iOS App
HighCVE-2025-63896: n/a
UnknownActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.