CVE-2024-56145:
Craft CMS has potential RCE when PHP `register_argc_argv` config setting is enabled
9.3
CVSS ScoreBasic Information
CVE ID
GHSA ID
EPSS Score
-
CWE
Published
12/18/2024
Updated
12/19/2024
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
craftcms/cms | composer | >= 5.0.0-RC1, < 5.5.2 | 5.5.2 |
craftcms/cms | composer | >= 4.0.0-RC1, < 4.13.2 | 4.13.2 |
craftcms/cms | composer | >= 3.0.0, < 3.9.14 | 3.9.14 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper handling of CLI arguments in web context. The patch modifies how $findConfig retrieves configuration values by adding a check for console mode before using App::cliOption. This indicates that the original implementation of App::cliOption usage in $findConfig was vulnerable to argument injection via $_SERVER['argv'] population in web requests when register_argc_argv is enabled. The CWEs (OS Command Injection and Code Injection) suggest these functions were involved in improperly sanitized input flow that could lead to code execution.