On October 21 at 16:00 CEST the PHP project released versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35. They fix two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619, known as “php2shell”. Under certain conditions both allow code execution on the server without authentication. The US agency CISA urges immediate patching and recommends taking offline any systems that cannot be patched quickly. Source: PHP security announcement.
What happened
The first flaw (CVE-2026-109618) concerns out-of-memory handling. If a request hits memory_limit at the wrong moment, PHP can leave partially initialized data behind and later treat it as valid. According to the PHP Foundation, on Apache with mod_php the attack works before any application code runs, with default settings. Code execution was also confirmed on PHP-FPM through application code paths. The second flaw (CVE-2026-109619) lets a later request handled by the same worker use memory that has already been freed.
The full scale of the problem came to light through reports from Calif, OpenAI and Wiz in August and September 2026. According to OpenAI, Calif researchers found one of the flaws using the GPT-5.6 Sol model. Disclosure did not go to plan: on October 20 the CVE identifiers leaked with an incorrect score (10.0 instead of 9.2), so the release was brought forward by a day.
Who is affected (more often than you think)
Every installation that serves web requests is at risk: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The highest risk is with mod_php. Versions 8.1 and older will not get official fixes. The PHP security team published minimal source backports for 7.4, 8.0 and 8.1; beyond that you need an LTS vendor or a migration.
The biggest risk lies in assumptions. “We don’t use PHP” is often not true. PHP runs the company website on a CMS, an old admin panel, a helpdesk tool, a container base image or a vendor appliance. CISA notes that PHP is often a component of other software, and the Dutch NCSC maintains a list of products that depend on PHP.
Action plan for the next 48 hours
1. Inventory
Check all systems, not only the ones you think of as PHP, starting with those exposed to the internet. Container registries, Kubernetes manifests, hosting configurations and SBOMs all help. OpenAI released a PHP version checker, but its URL mode relies only on response headers, so it does not replace checking on the server.
2. Update and restart
Update PHP to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or install your distribution’s package. Then restart every worker, because a running process with old code is still vulnerable. With containers that means rebuilding the image and redeploying, not just changing a tag in the repository.
3. If you cannot update right away
PHP lists temporary mitigations that reduce risk on specific attack paths but do not fully secure an installation. They include memory_limit=-1 set so the application cannot override it, a low post_max_size, session.upload_progress.enabled=0 with a worker restart, and on PHP 8.5 fatal_error_backtraces=0. According to CISA a WAF may offer partial protection. If none of this is possible, consider taking the system offline temporarily.
4. Look for signs of compromise
When CISA published its alert it had not seen active exploitation, but proof-of-concept exploits started circulating after the October 20 leak. Check whether PHP processes spawned shells or downloaded tools, and review recent logs on public systems.
The lesson: patch speed is a property of your process
OpenAI believes AI found these flaws before attackers did and expects many more similar findings in the coming months. Since July the PHP security team has published 15 CVEs and reviewed over 100 reports that turned out to be invalid, duplicates or not reproducible.
In our view the time from a published fix to production should be treated as an engineering metric, on par with feature lead time. In practice that means:
- Base images rebuilt automatically. The pipeline should rebuild images regularly and open a change when a new runtime version appears.
- One component inventory across environments. An SBOM generated in CI answers “where do we run PHP 8.3?” in minutes.
- Deploy in hours, not weeks. Automated tests and staged rollouts let you update a runtime without a night-time rescue operation.
- A plan for EOL versions. Migrating off an unsupported version is cheaper as a planned project than as an emergency.
While extending a CI/CD platform to more version control systems we saw that these rules have to work regardless of the tool. If automatic dependency refresh covers only some repositories, the vulnerability will survive exactly where it is missing.
Regulated and payment systems
In payment products a runtime update is not just a technical matter. PCI DSS 4.x requires critical security patches to be installed within one month of release. From working on products going through certification we know it is essential to establish in advance whether a change touches the certified scope. An architecture that separates the certified core from the web layer lets you patch a panel or API without retesting the whole solution.
If you are tidying up your update and deployment process, see how we work on DevOps and CI/CD, cloud applications and custom software.
FAQ
Is my WordPress site at risk? WordPress runs on PHP, so yes, if the server handles web requests with a vulnerable PHP version. On shared hosting the provider usually handles the update. Check whether they have done it and which PHP version is selected in your panel.
Is a WAF or a php.ini change enough? No. The only complete fix is updating. A WAF and temporary settings limit specific attack paths and buy time, but the installation stays vulnerable.
We run PHP 7.4 or 8.1. What now? The PHP project will not ship official fixes for these versions. Minimal source backports exist, and some distributions and LTS vendors offer their own patches. Ultimately you need to move to a supported branch and limit the system’s exposure until then.
Let’s talk
Want to find out where PHP runs in your infrastructure, or shorten the time from a published fix to production? Book a free consultation or write to kontakt@weban.pl.