What is Craft CMS?
Craft CMS is a popular PHP content management system built on the Yii framework, used by businesses and agencies worldwide for website and web application management. See CVE-2025-23209 for the full product context on Craft CMS's deployment characteristics.
Overview
CVE-2024-56145 is a code injection vulnerability (CWE-94) in Craft CMS that allows remote code execution when the server's PHP configuration has register_argc_argv enabled — a non-default but not uncommon PHP setting. Unlike CVE-2025-23209 (which requires knowledge of the security key), this vulnerability can be triggered without authentication on misconfigured servers. The 6-month gap between the December 2024 patch and the June 2025 CISA KEV listing reflects that many unpatched Craft CMS installations with register_argc_argv enabled were being actively exploited throughout 2025.
Affected Versions
| Product | Vulnerable | Fixed |
|---|---|---|
| Craft CMS 4.x | < 4.12.2 | 4.12.2 |
| Craft CMS 5.x | < 5.4.9 | 5.4.9 |
Technical Details
The code injection (CWE-94) exploits how PHP handles the register_argc_argv directive in combination with Craft CMS's routing. When register_argc_argv = On in php.ini, PHP makes the $_SERVER['argv'] array (command-line arguments) globally available. In a web context with this setting enabled, certain HTTP request parameters are misinterpreted as command-line arguments. Craft CMS uses the argv array in its console command handling — exploiting this allows an unauthenticated attacker to inject arbitrary console commands that execute on the server.
PHP configuration prerequisite: register_argc_argv defaults to Off in modern PHP installations but is On in some hosting environments and older configurations. The CVSS 9.8 (PR:N — no auth required) reflects that the vulnerability requires no credentials — only the PHP misconfiguration.
Relationship to other Craft CVEs:
- CVE-2024-56145 (this CVE, Dec 2024): Exploitable without authentication when
register_argc_argv = On - CVE-2025-23209 (Jan 2025): Requires low-privilege account + known security key
- CVE-2024-58136 (Yii CVE, Apr 2025): Framework-level alternate path bypass affecting Craft
The three CVEs represent an escalating research interest in Craft CMS's security boundaries throughout 2024–2025.
Exploitation Context
CISA confirmed active exploitation and added to the KEV catalog on June 2, 2025 — six months after the patch. Organizations running unpatched Craft CMS on servers with register_argc_argv enabled (a common configuration in shared hosting environments using older PHP configurations) remained exposed throughout this period.
Remediation
- Upgrade Craft CMS to 4.12.2 or 5.4.9 immediately. The CISA deadline was June 23, 2025.
- Set
register_argc_argv = Offinphp.ini— this is the root cause configuration issue. Disabling it prevents the code injection even on unpatched Craft versions. Verify:php -i | grep register_argc_argv. - Apply all companion Craft CMS patches: CVE-2025-23209 (Jan 2025) and Yii CVE-2024-58136 (Apr 2025) — all three affect the same Craft/Yii ecosystem.
- Protect
php.inifrom hosting environment changes that could re-enableregister_argc_argv. - Audit web server access logs for unusual requests to the Craft admin endpoint that triggered server-side command execution.
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2024-56145 |
| Vendor / Product | Craft CMS — Craft CMS |
| NVD Published | 2024-12-18 |
| NVD Last Modified | 2025-10-24 |
| CVSS 3.1 Score | 9.8 |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Severity | CRITICAL |
| CWE | CWE-94 find similar ↗ |
| CISA KEV Added | 2025-06-02 |
| CISA KEV Deadline | 2025-06-23 |
| Known Ransomware Use | No |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2024-12-18 | CVE published; Craft CMS 4.12.2 and 5.4.9 released with fix |
| 2025-06-02 | CISA adds to KEV (6-month delay reflects ongoing exploitation of unpatched installs) |
| 2025-06-23 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| GitHub Security Advisory GHSA-2p6p-9rc9-62j9 — Craft CMS CVE-2024-56145 | Vendor Advisory |
| NVD — CVE-2024-56145 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |