Demo

PHP2Shell: the critical PHP flaws and what to do now

PHP2Shell is the name given to two critical PHP flaws patched on 21 October 2026 but exploited from the 17th. Affected versions, urgent steps and governance lessons.

· 9 min read
Illustration: a glass code window with a cracked orange line, guarded by an orange shield

PHP2Shell is a pair of critical PHP flaws that allow remote code execution on a web server, without authentication. Patches came out on 21 October 2026, but attack attempts had been seen as early as the 17th. Public websites were taken offline as a precaution, and US authorities added the flaws to their catalogue of exploited vulnerabilities. Here is what happened, what to do now and what the episode teaches security leaders.

01

PHP2Shell: what happened

  • 17 October. Amazon's threat intelligence teams spot a first exploitation attempt on their honeypots, four days before the patches, reports IT-Connect. More attempts from several groups follow on the night of 20 to 21 October, before the embargo lifted: a video published by mistake and container images released early had leaked the details.
  • 20 October. The PHP team warns that two vulnerabilities rated 9.2 out of 10 (CVSS v4.0) will be fixed the next day.
  • 21 October. Versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35 are released. CERT-FR, the French government CERT, issues an alert. The same day, several public websites go offline as a precaution, including French prefecture sites according to the Interior Ministry and the Dutch parliament's website, notes Selectra. None of them was reported as hacked.
  • 22 October. CERT-FR reports proofs of concept working on some deployments.
  • 26 October. CERT-FR reports exploitation attempts, and the US agency CISA adds both flaws to its Known Exploited Vulnerabilities catalogue (KEV), giving federal agencies days to patch. A third flaw, CVE-2026-115560, is disclosed: it requires an unlikely mix of configuration and code and has no fix yet.

Technically, both flaws stem from error handling when a request is interrupted. The first (CVE-2026-109618) leaves request data half-initialised when memory runs out; the second (CVE-2026-109619) lets a later request reuse state left over in the same worker. According to IT-Connect, several researchers found them with help from AI models, and the underlying issue had been flagged in a 2024 audit.

02

Why these PHP vulnerabilities are so serious

  • PHP is everywhere. According to W3Techs, 69.2% of websites whose server-side language is known use PHP: corporate sites, online shops, intranets, local government portals and most content management systems.
  • No account needed. A single request is enough. For Apache mod_php, the PHP team says the attack can trigger before any application code runs, so no site setting stops it. PHP-FPM, php-cgi, FrankenPHP and LiteSpeed are also affected.
  • PHP hides inside products. Many appliances and software packages ship their own PHP. As of 28 October, the Dutch NCSC list tracked 757 products: 218 vulnerable, 144 already fixed, 354 under investigation and 40 not affected.
  • Old versions stay unpatched. Branches 8.1 and older are no longer maintained. VirusTotal data cited by IT-Connect show around 758,000 exposed servers advertising a PHP version between 5.4 and 8.1. And the 8.2 branch itself reaches end of life on 31 December 2026.
Animated PHP2Shell timeline with five dates. 17 October: first attack attempt observed, before any patch. 20 October: PHP announces two critical flaws. 21 October: patches released, several public websites taken offline as a precaution. 22 October: CERT-FR reports proofs of concept. 26 October: exploitation confirmed and added to the US catalogue of known exploited vulnerabilities. The segment between 17 and 21 October turns red: four days of attacks before the first patch. Conclusion: patching is not enough, look for signs of intrusion since 17 October.
The first attack attempts came four days before the patch: the period to investigate starts on 17 October, not 21. Video labels in French.
03

What to do now

The advice from CERT-FR, CERT-EU and the Canadian Centre for Cyber Security lines up:

  1. Inventory everything that runs PHP: web servers, intranets, internal tools, but also appliances, container images and vendor software. The NCSC list helps identify affected products.
  2. Update, starting with internet-facing systems, to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, then restart PHP workers to clear their in-memory state.
  3. Migrate end-of-life branches (8.1 and older) to a maintained version, or apply a backported fix from your operating system vendor if one exists.
  4. Isolate what cannot be patched right away: remove internet access or filter upstream. The settings suggested by PHP (disabling session.upload_progress, lowering post_max_size, restarting workers regularly) are only a partial stopgap.
  5. Look for signs of intrusion since 17 October, not since your update date: web server logs, unexpected processes, recently created files in the site tree, unusual outbound connections. The CERT-FR guide on containing a compromise, linked from its alert, sets out the steps.
  6. Ask your hosts and vendors: which version do they run, when did they patch, have they seen attempts?
  7. Open an incident if in doubt. For a personal data breach, notifying the supervisory authority is due within 72 hours (Article 33 GDPR); entities under NIS 2 must also send an early warning within 24 hours for a significant incident (Article 23). Our article on incident management under ISO 27035 walks through the process.
04

Governance lessons

  • Inventory sets your response time. An organisation that knows where PHP runs can patch within hours; the others start by searching. An up-to-date IT system map and, for purchased software, a software bill of materials (SBOM) buy back those hours.
  • Prioritise on exploitation, not just on score. A flaw listed in the KEV catalogue jumps the queue, whatever else is waiting. That is the approach we describe in our article on vulnerability management.
  • An end-of-life version is a risk for the register. Keeping PHP 7 "because the application works" is a decision that needs an owner, a migration deadline and, until then, compensating measures.
  • Taking a site offline should be planned. The administrations that shut their websites on 21 October made a continuity call: lose a service for a few hours rather than risk an intrusion. That trade-off is best decided in advance, in a business continuity plan and a cyber resilience approach.
  • Vendors are in scope. With more than 200 affected products, PHP2Shell is also a third-party risk management and supply chain security issue: questionnaires should ask how a vendor tracks the components it ships.
  • AI-assisted discovery will become common. If AI models help find flaws faster in components this widespread, urgent patches will come more often. The update process has to keep up.

To give every measure an owner, a deadline and follow-up, explore our action plan tracking.

Summary

01

Update without waiting

Only versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix the flaws. Temporary settings only partly protect, and branches 8.1 and older have no patch.

02

Look for traces since 17 October

Attacks began before the patches were published. A server updated on the 22nd may have been targeted for several days.

03

Know where PHP runs

Websites and intranets, but also appliances and vendor software: without an inventory, you cannot tell what to patch or whom to ask.

Frequently asked questions

What is PHP2Shell?

PHP2Shell is the name given to two critical vulnerabilities in the PHP interpreter, CVE-2026-109618 and CVE-2026-109619, rated 9.2 out of 10 (CVSS v4.0). A request sent by an unauthenticated attacker can lead to remote code execution on the server, by abusing error handling when a request is interrupted.

Which PHP versions are vulnerable?

According to CERT-FR, every version before 8.2.35, 8.3.36, 8.4.27 and 8.5.12, including all 5.x, 7.x, 8.0 and 8.1 branches, which no longer receive updates. PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed setups are affected, with mod_php the most exposed according to the PHP team.

How do I know if my website is vulnerable?

Check the PHP version on each server (php -v, or ask your host) and compare it with the fixed versions. Remember software and appliances that ship their own PHP: the Dutch NCSC keeps a public list of affected products, updated with vendors.

Are the workarounds enough?

No. The PHP team says there is no complete mitigation: disabling upload progress tracking, lowering the maximum request size or restarting workers regularly reduces the risk without removing it. If you cannot update right away, CERT-FR and CERT-EU recommend isolating exposed systems.

Do I have to notify the data protection authority?

Only if there is an actual personal data breach, for instance if the investigation shows an attacker reached a database. Notification is then due within 72 hours of discovery (Article 33 GDPR). A blocked attempt is not a breach, but it should be recorded.

A platform and service that adapt to you

Our platform is designed for fine-tuned configuration and broad adaptability to your needs.