php-cli is vulnerable to Remote Code Execution (RCE)
99
CVE Score
Critical
Remote Code Execution (RCE)
Affected versions of PHP are vulnerable to unauthenticated remote code execution. Request-owned session, error, or extension state can survive after its memory is freed, and a later request on the same worker can use that state before initialization resets it. Confirmed paths include session upload progress, early INI diagnostics, and on PHP 8.5 fatal error backtraces.
Upgrade php-cli to the patch version. Until the update is installed, on RHEL and Amazon Linux 2, add session.upload_progress.enabled = 0 as /etc/php.d/99-upload-progress.ini because that directory is shared with FPM, lock php_admin_flag[session.upload_progress.enabled] = off in /etc/php-fpm.d/www.conf, and restart php-fpm. On Debian and Ubuntu, php-cli does not share its ini with FPM or Apache. Add php_admin_flag[session.upload_progress.enabled] = off to /etc/php/<version>/fpm/pool.d/www.conf and restart php<version>-fpm, or set php_admin_flag session.upload_progress.enabled off in the Apache server config and restart apache2. ini_set() and FPM .user.ini do not apply in time. Remove per-request INI settings that warn before initialization. On PHP 8.5, also set fatal_error_backtraces = 0 in that same configuration and lock it with php_admin_flag. Leave the directive unset on older PHP 8 releases, where it does not exist. ini_set() can turn it back on unless it is locked. These settings block confirmed paths only, so the temporary mitigation may not be sufficient.
You are affected if you are using a version that falls within the vulnerable range and the install serves untrusted web requests from a worker that handles more than one request. Session upload progress is enabled by default.
5.4.0 - 8.2.34
Fixed in 8.2.358.3.0 - 8.3.35
Fixed in 8.3.368.4.0 - 8.4.26
Fixed in 8.4.278.5.0 - 8.5.11
Fixed in 8.5.12php-cli is vulnerable to Remote Code Execution (RCE) in versions 5.4.0 - 8.2.34, 8.3.0 - 8.3.35, 8.4.0 - 8.4.26 and 8.5.0 - 8.5.11.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.