VYPR
Critical severityCISA KEVNVD Advisory· Published Dec 18, 2024· Updated Oct 21, 2025

RCE when PHP `register_argc_argv` config setting is enabled in craftcms/cms

CVE-2024-56145

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.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
craftcms/cmsPackagist
>= 5.0.0-RC1, < 5.5.25.5.2
craftcms/cmsPackagist
>= 4.0.0-RC1, < 4.13.24.13.2
craftcms/cmsPackagist
>= 3.0.0, < 3.9.143.9.14

Affected products

1

Patches

1
82e893fb794d

Fixed an RCE vulnerability

https://github.com/craftcms/cmsbrandonkellyNov 19, 2024via ghsa
2 files changed · +14 7
  • bootstrap/bootstrap.php+10 7 modified
    @@ -27,8 +27,15 @@
     // Determine the paths
     // -----------------------------------------------------------------------------
     
    -$findConfig = function(string $cliName, string $envName) {
    -    return App::cliOption($cliName, true) ?? App::env($envName);
    +$findConfig = function(string $cliName, string $envName) use ($appType) {
    +    if ($appType === 'console') {
    +        $value = App::cliOption($cliName, true);
    +        if ($value !== null) {
    +            return $value;
    +        }
    +    }
    +
    +    return App::env($envName);
     };
     
     // Set the vendor path. By default assume that it's 4 levels up from here
    @@ -49,11 +56,7 @@
     // Set the environment
     // -----------------------------------------------------------------------------
     
    -$environment = App::cliOption('--env', true)
    -    ?? App::env('CRAFT_ENVIRONMENT')
    -    ?? App::env('ENVIRONMENT')
    -    ?? $_SERVER['SERVER_NAME']
    -    ?? null;
    +$environment = $findConfig('--env', 'CRAFT_ENVIRONMENT') ?? App::env('ENVIRONMENT') ?? $_SERVER['SERVER_NAME'] ?? null;
     
     // Load the general config
     // -----------------------------------------------------------------------------
    
  • CHANGELOG.md+4 0 modified
    @@ -1,5 +1,9 @@
     # Release Notes for Craft CMS 4
     
    +## Unreleased
    +
    +- Fixed an RCE vulnerability.
    +
     ## 4.13.1.1 - 2024-11-18
     
     - Fixed a PHP error. ([#16142](https://github.com/craftcms/cms/issues/16142))
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.