PHP has released emergency patches for two critical vulnerabilities grouped under the name PHP2Shell, which allow remote code execution without authentication. Active exploitation attempts have already been observed, prompting immediate recommendations to update and restart services.
The PHP community issued emergency updates to address the pair of flaws, catalogued as CVE-2026-109618 and CVE-2026-109619. Both vulnerabilities carry a CVSS v4.0 score of 9.2 and affect servers running vulnerable branches of the runtime. The issues are particularly concerning because exposure does not depend on web application code; even trivial pages can be targeted if the server uses an affected PHP engine.
Affected Deployment Methods
The risk is highest with Apache mod_php, where a demonstrated vector can activate before application code executes. The broad attack surface also includes PHP-FPM, php-cgi, FrankenPHP, and LiteSpeed.
Technical Details of the Flaws
CVE-2026-109618 describes a chain of issues resulting in memory corruption that can lead to code execution with the privileges of the web process. CVE-2026-109619 involves an obsolete global state problem with typical use-after-free consequences, enabling memory disclosure and, in some scenarios, code execution. Memory disclosure raises additional risks by potentially exposing passwords, tokens, API keys, or certificates stored in RAM.
Patched Versions and Required Actions
The corrected releases are PHP 8.5.12, PHP 8.4.27, PHP 8.3.36, and PHP 8.2.35. After installation, administrators must restart Apache, PHP-FPM, and any persistent workers to ensure the patched runtime is loaded.
Mitigation Measures
- For CVE-2026-109618: set memory_limit=-1, keep post_max_size low, and limit request sizes at the web server or proxy level.
- Avoid using RLIMIT_AS or RLIMIT_DATA as memory limit substitutes, as they may trigger vulnerable code paths.
- For CVE-2026-109619: disable session.upload_progress.enabled and restart all workers.
- In PHP 8.5, disabling fatal_error_backtraces provides partial containment.
After patching, teams should monitor for anomalous multipart requests followed by memory limit errors, spikes in HTTP 500 responses, unusually large PHPSESSID cookies, or unexplained worker restarts.


