You are signed in. Close

You are signed out. Close

Thank you. Your subscription has started. Close

Thank you. You will get an email when a new comic comes out. Close

Almost done. Check your inbox and press the button in our email to confirm. Close

We could not check that you are a person. Please try again. Close

We could not confirm your payment. If you paid, use the link "Sign in" at the bottom of the page. Close

Something went wrong on our side. Please try again in a moment. Close

php2shell: the PHP vulnerability that shook the web in 2026

In October 2026, the cyber security centre of the Netherlands switched off its own website, and it was not alone. The reason was php2shell: two bugs in PHP, the program that builds the pages of about 7 in 10 websites, WordPress included. Five free comics show what PHP does, how one strange upload form trips it before a website even starts, how a crash became a stranger's commands on the server, how the secret leaked before the fix, and why updating PHP was harder than it sounds.

Questions this comic answers

  1. What is php2shell?

    php2shell is the name of two bugs found in PHP in October 2026. PHP is the program that builds the pages of about 7 in 10 websites, WordPress sites included. The bugs were in every version since 2012, and a stranger could use them with no password, only by visiting a page.

    Read episode 1 »
  2. How does the php2shell attack start?

    The php2shell attack starts with a form sent to any page of a PHP website. PHP unpacks every form before the website's own code runs. The attacker's form is built as boxes inside boxes, so PHP runs out of memory halfway. It stops in a hurry and leaves half-written notes in memory, and its cleanup later trusts them.

    Read episode 2 »
  3. How does php2shell let an attacker run commands on a server?

    PHP serves visitor after visitor with the same running copy, called a worker, and with php2shell, leftovers of one request survive into the next one. The attacker uses them to make PHP send back pieces of its memory in a very long cookie. Then he knows where things sit, and he writes a note that PHP follows as an order: his command runs on the server.

    Read episode 3 »
  4. Why were php2shell attacks seen on the day the fix came out?

    The fix for php2shell was made in secret, so it could reach servers before attackers knew about the bug. The world was to be told on October 22, 2026. But the details leaked on social media on October 20, and the fix came out on October 21. On that same day, attacks were already seen on trap servers.

    Read episode 4 »
  5. How do you fix php2shell?

    You fix php2shell by updating PHP to a fixed version (8.5.12, 8.4.27, 8.3.36 or 8.2.35) and then restarting PHP, because running copies keep the old PHP in memory. PHP 8.1 and older got no new official version. No setting fully protected a server, so some owners switched their websites off until they were sure.

    Read episode 5 »