DARKDATA

Cyber security

PHP2Shell and seven more critical flaws: two months of urgent PHP patches

Published on · 5 min read · DARKDATA team

PHP powers a huge share of the web: content management systems, shops, intranets and also the admin consoles of many network appliances. In one month it has received two rounds of critical fixes. The first, PHP2Shell, is already being exploited on the internet. The second arrived on 19 November with seven more critical flaws. If your company has anything built in PHP, this is a summary of what has happened and what you should do.

October: PHP2Shell

PHP2Shell is the name given to two vulnerabilities, CVE-2026-109618 and CVE-2026-109619, with a score of 9.2 under CVSS 4.0. Both allow unauthenticated code execution on the server.

  • CVE-2026-109618. If PHP runs out of memory while preparing a request, it leaves internal data half-built and carries on working with it.
  • CVE-2026-109619. After a fatal error, global state is left pointing to memory that has already been freed, and the next request handled by that same process acts on it.

Any PHP installation that serves web requests is in scope, and the risk is higher with Apache and mod_php. The researchers who analysed it say they have confirmed that it also affects old unsupported branches, including PHP 5.

Disclosure did not go smoothly. The vulnerability identifiers began circulating on forums on 20 October, two days before the agreed date, and PHP brought the fixes forward to the 21st. By then there were already exploitation attempts: a honeypot network had been recording them since 17 October.

Timeline

DateMilestone
17 OctoberA honeypot network records the first exploitation attempts, four days before disclosure.
20 OctoberThe PHP2Shell identifiers begin circulating on forums.
21 OctoberPHP releases versions 8.2.35, 8.3.36, 8.4.27 and 8.5.12, a day earlier than planned.
26 OctoberCISA adds both vulnerabilities to its Known Exploited Vulnerabilities catalogue.
29 OctoberExploitation is confirmed against firewall administration interfaces exposed to the internet, chained with a Linux kernel flaw to gain root privileges.
19 NovemberPHP publishes a second round with seven critical flaws and releases PHP 8.6.0.

The 29 October entry deserves attention. The first confirmed real-world victims were not shops or blogs, but the web consoles of perimeter security appliances, which also use PHP. Telemetry published at the time put the number of exposed, potentially vulnerable instances at more than 22.6 million.

November: seven more criticals

On 19 November, PHP released versions 8.2.36, 8.3.37, 8.4.28 and 8.5.13, along with PHP 8.6.0, which already includes the fixes. They fix 17 or 18 vulnerabilities, depending on how you count them, and seven are critical. Three stand out:

  • CVE-2026-129289, request smuggling in PHP-FPM. If the application opens the request body and does not read it to the end, the leftover data stays on the connection and can slip through as a new request that executes PHP code. It only applies when the web server reuses its connections to PHP-FPM, for example with fastcgi_keep_conn on in nginx or enablereuse=on in Apache. The usual configurations, which close the connection after each request, are not exposed to the demonstrated attack.
  • CVE-2026-115560, file upload progress. This session feature writes a client-controlled value into the session. If the application mixes serialisation formats, that value can end up being interpreted as an object. The fix disables the feature by default.
  • CVE-2026-126714, nicknamed phpAfterShell. If a process dies while writing a session file, remnants of the previous content are left behind and can later be read as valid data. It affects file-based session storage, which is what PHP uses by default. It was found by a team that, with the help of AI, re-examined the code PHP2Shell had pointed to. The October releases do not fix it.

At the time of publishing this article, there is no known real-world exploitation of the November flaws. There are, however, public proofs of concept for several of them, and the technical details of all of them have been published, so it is reasonable to expect attempts.

Why it matters even if you do not write PHP

PHP rarely appears in the inventory as "PHP". It appears as the content management system behind the corporate website, the online shop, the customer portal a supplier built years ago or the web console of an appliance. Three situations come up again and again in incidents:

  • Unsupported versions. PHP 8.1 and earlier do not receive an official release with these fixes. If your application depends on them, you depend on whatever your Linux distribution or your supplier publishes.
  • Containers and images. Updating the server does not update the image the application was built from. It has to be rebuilt.
  • Shared hosting and control panels. The PHP version is decided by the hosting control panel, and an old setting can re-enable what the fix disables.

What to do now

  1. Take an inventory. Locate everything that runs PHP, including third-party products with a web console. Ask your suppliers which version they ship.
  2. Update to the 19 November releases (8.2.36, 8.3.37, 8.4.28, 8.5.13 or 8.6.0). The October ones are no longer enough. If you use your distribution's packages, check its security bulletin: many apply fixes without changing the version number.
  3. Take admin consoles off the internet. This is the measure that would have prevented the first confirmed compromises.
  4. Disable upload progress if you do not use it (session.upload_progress.enabled = 0) and restart the processes. It is a partial measure, not a substitute for updating.
  5. Review the connection to PHP-FPM. Do not reuse connections until you have updated, and never expose the PHP-FPM port to networks you do not control.
  6. Look for signs of compromise on servers that have been exposed since 17 October, when the first attempts were recorded: PHP or web server processes spawning command shells, curl or wget, repeated process crashes caused by memory exhaustion and new files in the application's folders.

PHP warns that no configuration change fully mitigates PHP2Shell. The only complete fix is to update.

If you do not know which version sits behind your applications, our security audit and attack surface monitoring will identify it. And if you find signs of an intrusion, the incident response team is available around the clock.

Concerned about something you have read?

Tell us about it. An analyst will tell you where your company stands and what we would do first.