PHP2Shell series, 4 parts
Read in order, or jump to the part you need.
  1. What PHP2Shell is
  2. How the two bugs work
  3. How it was found, and the leak
  4. How to patch and protect your servers

Bonus: this 3D animation

Most write-ups of PHP2Shell use words like memory corruption and stale state. This page shows the same story as a short 3D animation, so you can watch it instead. You do not need to know any programming. Press play, or click through the six scenes at your own pace, and drag the picture sideways to look around.

The idea in one line
PHP is the engine under a website. Two bugs in it let a stranger trick that engine into trusting unfinished work or leftover notes, before the site's own login even runs. The fix is to update PHP.

A simplified analogy, not the real code. Real attacks are hard to pull off reliably, because they depend on the exact PHP build, settings and memory layout.

What you just watched, scene by scene

This list tells the same story as the animation, for anyone who prefers to read it or cannot run 3D graphics.

  1. A normal visit. A visitor asks for a page and PHP builds it piece by piece.
  2. A limited workspace. Each request gets a fixed amount of memory, and it is wiped afterwards.
  3. Bug 1 (CVE-2026-109618). An attacker makes PHP run out of space at one precise moment. PHP jumps out mid-job, and the cleanup step trusts the half-built piece.
  4. Bug 2 (CVE-2026-109619). One request leaves a note pointing at a drawer. The drawer is emptied and reused, and a second request follows the old note into the attacker's data.
  5. Why a login does not help. All of this happens in PHP before the site's own code runs, so the attacker's instructions get past the login and can reach files and settings.
  6. The fix. Patched PHP stops at the next safe point when it hits the limit, instead of jumping out mid-job.

What the animation simplifies

Where to go next

Need help with PHP2Shell?
This is the kind of fix we help with. GreyScript AI helps teams find where PHP runs behind their websites and AI products, patch it in the right order, and secure what sits around it: where model keys and other secrets live, how the AI integration is built, and which credentials to rotate. We start with an inventory, then give you a short, ordered patch-and-rotate plan, backed by our AI governance and security audit. Book a 30-minute scoping call and tell us what you run.

Sources: PHP advisory for CVE-2026-109618, PHP advisory for CVE-2026-109619, Datadog Security Labs, CISA alert. Read 23 October 2026. The animation is an illustration, not a real incident. 3D drawn with three.js (MIT license)