PHP2Shell: patch PHP itself, and retire old versions
Two critical PHP flaws can let anyone run code on a web server without logging in. What CERT-PH asked of offices here, and what old versions mean.
Published · 4 min read

On 21 October the PHP project shipped emergency fixes for two flaws, CVE-2026-109618 and CVE-2026-109619, that can let an attacker run code on a web server without logging in. Reported together as PHP2Shell, they affect every PHP installation that serves web requests, and the PHP security team put the risk highest for Apache with mod_php, where a demonstrated exploit can trigger the attack before any application code runs. The next day CERT-PH, the DICT's national emergency response team, told Philippine organisations, government and private, to find their PHP installations and patch them. BleepingComputer puts PHP behind 75 to 80 per cent of all websites, so an office website or online form may well run on it.
Both flaws were rated 9.2 out of 10 on the CVSS v4.0 scale, and BleepingComputer reported that Cloudflare was already seeing early attacks before the fixes shipped, according to its chief technology officer. Britain's National Cyber Security Centre told organisations there to update or take systems offline until they could. PHP published settings that reduce exposure while an update is arranged, and says plainly that they do not make an installation safe. CERT-PH's advisory, as Newsbytes.PH reported it, did not establish that any Philippine organisation had been compromised.
Why the application cannot fix this
Most of the security work on a website goes into the application: logins, permissions, checks on what users type. A flaw that can fire before the application runs goes around all of it. CERT-PH made the same point: deal with the server software underneath, not only with application-level security. A well-built site on an unpatched PHP is an unpatched server.
PHP is also the layer an office is least likely to own. A host installed it, a developer chose the version years ago, and nobody has looked since because the site still works. The version that matters is the one the web server actually runs, which is not always the one on a developer's laptop or even on the server's own command line.
Versions past their end of life
The fixed releases are 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Branches older than 8.2 are past their end of life: PHP 8.1 stopped receiving fixes on 31 December 2025, 8.0 in November 2023 and 7.4 in November 2022, and the project ships no updates for them. Because of the severity, its security team also published minimal source backports for 7.4, 8.0 and 8.1, for people who build PHP themselves or have no long-term-support vendor, and some Linux distributions backport fixes into their own packages. A backport closes this hole. It does not make an old version supported, and PHP 8.2, the oldest branch still covered, reaches its own end of life on 31 December 2026.
What it means for a Laravel application
Laravel, one of the frameworks in my own stack, runs on PHP, so here is what this means for anyone running a Laravel application. Updating it through Composer updates the framework and its packages. It does not touch PHP, which lives on the server, in the container image or in the host's control panel, and has to be updated there. A container image built on an old PHP keeps that PHP until someone rebuilds it, however current the application inside it is.
Five checks for any PHP server
- List every place PHP runs: the website, online forms, an intranet, the test site someone forgot. Ask your host or developer if you do not have the list.
- Ask, in writing, which PHP version the web server runs, and check that it is at least the fixed release for its branch: 8.5.12, 8.4.27, 8.3.36 or 8.2.35.
- If it is 8.1 or older, ask who applied a backported fix, and when. Then plan the upgrade, because the next flaw may not get a backport.
- Read the server logs, as CERT-PH advised, going back to before the fixes shipped, since attacks were seen before they were out. Treat anything you cannot explain as an incident until someone shows it is not.
- If you are on 8.2, put 31 December 2026 in the calendar. After that date it gets no security fixes at all.
If nobody in your office can say which PHP version your website runs, start there. The fit check is a short way to find out what else needs an owner.
Sources
- PHP, Security advisory: Critical remote code execution vulnerabilities, update now, 21 October 2026
- PHP, Upcoming Critical PHP Security Release, 20 October 2026
- PHP, Supported Versions
- PHP, Unsupported Branches
- BleepingComputer, PHP ships emergency patches for critical PHP2Shell flaws, 21 October 2026
- Newsbytes.PH, DICT cybersecurity unit warns of critical PHP flaws that could expose websites to hackers, 24 October 2026
Enrique Lacambra III builds internal business systems from Cainta, Rizal.
Tell me what is broken and I will tell you if it is worth building. A 20-minute call, no charge, and I will say so if you do not need me.
