In October 2026, the PHP development team disclosed two critical security vulnerabilities in PHP. Both can allow remote code execution, meaning that an attacker may be able to make a vulnerable web server run commands without first logging in. Each vulnerability received a severity score of 9.2 out of 10.
The vulnerabilities are:
- CVE-2026-109618: remote code execution caused by corruption during an out-of-memory error.
- CVE-2026-109619: remote code execution caused by PHP retaining outdated information between web requests.
The PHP team states that updating PHP is the only complete solution for these two vulnerabilities. Temporary configuration changes can reduce the risk, but they cannot remove it entirely.
CVE-2026-109618: out-of-memory corruption
PHP uses memory while processing each request received by a website. If a request uses too much memory, PHP normally stops it. However, vulnerable versions can stop the request while some internal information is only partly prepared. During the clean-up process, PHP may then treat this incomplete information as valid.
An attacker can deliberately send a complex request designed to exhaust PHPโs memory. This is particularly possible with multipart requests, which are commonly used for forms and file uploads. If the memory is corrupted in the right way, the attacker may be able to execute code using the web serverโs account.
This attack is especially serious because it can occur before the websiteโs own PHP application begins running. Security checks written into WordPress, Drupal, Laravel or another PHP application may therefore never be reached.
CVE-2026-109619: stale global state
PHP web servers normally use long-running worker processes. A worker receives a request, processes it and then remains available for another request.
Some information is meant to exist for only one request. In vulnerable PHP versions, an error can prevent that information from being cleared correctly. The worker may keep a reference to memory that has already been released. When the same worker receives another request, it may try to use that outdated reference. This is known as a โuse-after-freeโ vulnerability.
A carefully planned series of requests may use this behaviour to disclose information, corrupt memory or execute code. Successful attacks have been demonstrated against Apache with mod_php and against PHP-FPM under certain conditions.
Who is affected?
All organisations operating an unpatched PHP installation that serves web requests should treat the vulnerabilities as urgent. This includes systems using Apache with mod_php, PHP-FPM, php-cgi, FrankenPHP, LiteSpeed or LSAPI, shared web-hosting services, and containerised PHP websites.
Apache with mod_php is considered the highest-risk configuration because an unauthenticated attack has been demonstrated before any application code runs. PHP-FPM is not immune: one of the session-related attack paths has also been demonstrated against it.
Applications such as WordPress are not vulnerable simply because they are WordPress sites. They are at risk when the server underneath them is running an affected PHP version. A fully updated application can therefore remain exposed if its PHP runtime has not been patched.
Affected versions and minimum corrected versions
- PHP 8.2: versions earlier than 8.2.35; update to at least 8.2.35.
- PHP 8.3: versions earlier than 8.3.36; update to at least 8.3.36.
- PHP 8.4: versions earlier than 8.4.27; update to at least 8.4.27.
- PHP 8.5: versions earlier than 8.5.12; update to at least 8.5.12.
PHP 8.1 and older are no longer supported directly by the PHP project. A business using one of these versions should upgrade to a supported branch or obtain a confirmed backported fix from its operating-system or long-term-support supplier.
Immediate patching steps
The first step is to identify every PHP installation, including development servers, background services, containers and old sites that may have been forgotten. Administrators should check both the command-line version and the version used by the web server because they may be different.
A safe update process is:
- Back up the application, configuration and database.
- Test the corrected PHP release in a non-production environment.
- Install the security update using the operating system, hosting provider or official PHP package.
- Restart Apache, PHP-FPM, LiteSpeed and every other PHP worker.
- Confirm from the web environmentโnot only the command lineโthat the corrected version is active.
- Test logins, forms, uploads, scheduled jobs and payment or email functions.
- Check that old PHP binaries and old container images are no longer serving traffic.
Windows users should install the updated -1 builds, such as PHP 8.5.12-1 or 8.4.27-1. These also contain an updated Brotli library addressing CVE-2026-111497, which may be reachable through PHPโs cURL extension when automatic response decompression is enabled.
Temporary measures when immediate updating is impossible
These measures reduce exposure but do not make an affected system safe:
- Disable session upload progress by setting
session.upload_progress.enabled=0in the main PHP or server configuration. - On PHP 8.5, set
fatal_error_backtraces=0. - Restart every PHP worker after changing the configuration.
- Restrict request and upload sizes at the web server or reverse proxy.
- Block multipart requests if the website does not use forms or file uploads.
- Fix fatal errors, execution timeouts and repeated warnings on attacker-accessible pages.
- Prevent applications from overriding security settings.
For CVE-2026-109618, the PHP advisory also identifies memory_limit=-1 as a temporary measure because it removes the predictable per-request memory limit used by the demonstrated attack. However, this is not a complete fix and can create operational problems if a process consumes excessive memory.
Resolving the problem entirely
The two vulnerabilities are completely removed only by running a corrected PHP version, including any official vendor backport, and restarting every worker that loaded the vulnerable code.
PHP published a separate notice on 23 October about an unlikely session-upload-progress attack path. Until a later bug-fix release, PHP advises disabling session.upload_progress.enabled as a precaution. That additional notice does not replace the need to patch the two vulnerabilities discussed here.
Patching also does not remove an attacker who may already have compromised the server. If suspicious activity is found, the organisation should isolate the system, preserve its logs, rebuild it from a trusted image and rotate passwords, API keys, database credentials and other secrets. Application files should be compared with known clean copies, and unexpected administrator accounts, scheduled tasks and uploaded scripts should be investigated.
Finally, organisations should maintain an inventory of PHP systems, use supported PHP branches, test security updates promptly and automate warnings when software reaches end of support. These steps cannot prevent every future vulnerability, but they greatly reduce the time during which a newly discovered flaw can be exploited.