What happened?
The PHP team released 8.5.12, 8.4.27, 8.3.36 and 8.2.35 with an unusual message on its home page: “critical remote code execution vulnerabilities, update now”. The two flaws, known together as PHP2Shell, are rated 9.2 out of 10 (CVSS v4.0).
- CVE-2026-109618 — out-of-memory corruption. When PHP runs out of memory mid-operation, it can leave request data half-initialized; cleanup then treats it as valid.
- CVE-2026-109619 — stale state across requests. Part of a request’s internal state can survive after its memory is freed, and a later request on the same worker may use it.
Put simply: with a carefully crafted request, an attacker could take over the PHP process. As php.net warns, there is no complete mitigation — updating is the only safe choice.
Who is affected?
According to php.net, every PHP installation serving web requests: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. Risk is highest on Apache with mod_php, where an attack was shown to trigger before any application code runs.
Wiz Research, one of the teams that reported the flaws, says every PHP version from the last decade is affected by at least one of them, and demonstrated unauthenticated attacks against WordPress, Drupal and Joomla images. Even when an attack fails to run code, the memory leak can expose passwords, tokens or API keys.
The role of artificial intelligence
This is what makes the story stand out. The PHP Foundation explains that security firm Calif began auditing PHP on 30 July and, on 11 August, reported a remote code execution. OpenAI independently reported the same root cause that day, and Wiz added new attack paths on 24 August. Wiz says it used AI models to discover, verify and adapt the attacks, and the foundation explicitly thanks OpenAI Codex Security.
On the other side, the PHP team also uses AI defensively — tools to validate reports and group those that share a root cause. Two nuances matter:
- AI didn’t do it alone. The first signs of the problem were spotted in 2024 by a PHP core developer while fixing another finding from a human-led audit. AI helped prove it was truly exploitable.
- AI also creates noise. The team worked through more than 100 reports that turned out invalid, duplicated or not reproducible. In the foundation’s words, AI helps validate, “but a person makes every call and works on every patch.”
The takeaway cuts both ways: AI speeds up defenders, and attackers too. Details leaked days before the coordinated release and, according to Fortune, Cloudflare had already seen early attack attempts. Reaction time matters.
What to do with your site today
- Check your PHP version. In WordPress: Tools → Site Health → Info → Server. It also appears in your hosting panel.
- Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or to your distribution’s patched package. On shared hosting, ask your provider to confirm in writing that the patch is applied.
- Don’t forget staging sites and any old installation still online.
- On PHP 8.1 or older? PHP no longer updates them. Ask your provider about backported fixes or, better, move to a supported version. Note that PHP 8.2 reaches end of life on 31 December 2026.
- If you can’t update right away and you control the server: disable
session.upload_progress.enabled, limitpost_max_sizeand restart PHP workers. According to Patchstack, these changes do not work throughini_set()or.user.ini. They are temporary measures, not a fix. - Don’t install unofficial “fix” plugins or paste code snippets from dubious sources.
- Watch for signs of attack: repeated memory-limit errors, many 500 errors, unusually large
PHPSESSIDcookies or unexplained worker restarts. If you see them, rotate passwords and API keys.
What this leaves us
PHP2Shell confirms something important: AI isn’t here to replace technical teams — it multiplies what they can do, for better and for worse. For anyone running websites and online stores, preventive maintenance is no longer optional: update on time, know what runs on your server, and have someone watching when an alert like this lands.
