Turn off the memory limit

CVE-2026-109618

This is a temporary setting. It reduces the risk but does not fix the bug. Update PHP to fix it for real.

What

memory_limit = -1

Why

CVE-2026-109618 happens when PHP runs out of memory at its limit in the middle of handling a request. With no limit, that trigger is gone.

Set it where your app can't override it: the PHP-FPM pool or Apache config (php_admin_value). Then check that nothing puts a limit back. php php2shell.php scans your project for ini_set('memory_limit', ...), .htaccess and .user.ini.

Watch out

Set it by hand

Your setupWhereAdd this
Any (php.ini)php.ini, or a new file in its conf.d foldermemory_limit = -1
PHP-FPMpool file, e.g. /etc/php/8.3/fpm/pool.d/www.confphp_admin_value[memory_limit] = -1
Apache mod_phpserver or VirtualHost configphp_admin_value memory_limit -1
Docker (official image)your DockerfileRUN echo "memory_limit = -1" >> /usr/local/etc/php/conf.d/99-php2shell.ini
Windows / XAMPP / IISphp.ini in your PHP foldermemory_limit = -1
Shared hostingAsk your provider. .user.ini and .htaccess are not reliable for this (why).

Then restart PHP. Nothing changes until you do.

Undo

Run php php2shell.php --undo and pick the change. Or remove the line by hand and restart PHP.

Source: php.net