NewsCrawler.org

PHP2Shell: how two PHP vulnerabilities happened and how they were fixed

わかった気になれるPHP脆弱性の原因
102号室のポストだけ郵便があふれている集合ポスト
部屋番号のついたマンション。入居中の部屋と空き部屋がある
「102」と書かれたメモが102号室のドアを指している
Image: zenn.dev

What happened next

  1. PHP to Release Fix for "Critical" Vulnerability on 19 November
  2. Several server vulnerabilities in November 2026 and two architecture defenses

Early on 21 October (Japan time), PHP developers announced fixes for two vulnerabilities rated 9.2 out of 10, together called PHP2Shell. Part of the information leaked early, so the release came one day earlier than planned. Without logging in, an attacker could make the server run commands sent from outside.

The first flaw is the use of uninitialized memory[1]. When a request reached the limit on the number of items, the code jumped out of the operation with longjmp[2], leaving a table with unfilled entries. The second flaw is use-after-free[3]: internal state left over from one request was carried into the next and pointed to memory that had already been freed.

The fix changes what happens when the limit is reached: the code now records the overflow and finishes cleanly, and the worker is replaced when usage reaches twice the limit. Fixed versions were released only for PHP 8.2 and later, so older versions got no fix and their users had to upgrade or stop the service. On 21 October, games, online shops and municipal sites in Japan entered emergency maintenance, and the fixed version was released at 23:00. Two games ended: World Quest on 21 October, and Boku no Makai wo Sukutte! (announced on 22 October), and on 24 October a successful takeover was observed on a decoy server.

Read the original zenn.dev

Sources

  • Zenn JA

    わかった気になれるPHP脆弱性の原因

    3 likes0 bookmarks0 comments

Earlier in this story

  1. Deep dive into PHP2Shell: from heap memory basics to a working exploit

The whole story · 4 →

Published: First seen: Читать по-русски

Open as a page