Published Date: December 19, 2024
| Package | Affected Versions | Patched Versions | Severity |
|---|---|---|---|
| 📦 craftcms/cms (Composer) | >= 5.0.0-RC1, < 5.5.2 | 5.5.2 | Critical |
Description
Summary of the Vulnerability
Craft CMS has a critical remote code execution (RCE) vulnerability. The issue arises when the PHP configuration setting
register_argc_argv is enabled. Attackers could exploit this to execute arbitrary code, putting websites and servers at significant risk.Impact
If
register_argc_argv is enabled in your PHP configuration (php.ini), your Craft CMS installation is vulnerable. This setting allows PHP to expose script arguments via $argv and $argc, which attackers can manipulate in certain scenarios.How to Check if You’re Affected
- Locate your
php.inifile. This is typically found in/etc/php/{version}/cli/php.inion Linux or via your web server configuration. - Look for the line:
register_argc_argv = OnPatches & Workarounds
Solution
Patches
- Upgrade Immediately:
- For Craft CMS 4.x, update to 4.13.2.
- For Craft CMS 5.x, update to 5.5.2.
To update, use Composer:
Workarounds
If upgrading isn’t an option right now:
- Disable
register_argc_argvinphp.ini:
- Restart your web server to apply the change:
For Apache:
For Nginx: