MOJI

PHP2Shell: check your sites, then find the next flaw first

AI helped find two critical PHP flaws that let attackers take over web servers. How to check and patch your sites today, and how to point your own agents at your code before attackers do.

On 21 October, PHP released fixes for two critical flaws that researchers now call PHP2Shell, CVE-2026-109618 and CVE-2026-109619. Either flaw lets an attacker run their own code on a web server over the network, with no login, and both score 9.2 out of 10 on the CVSS 4.0 scale. Researchers at Calif, Wiz and OpenAI found them with the help of AI models. Wiz says every PHP version released in the last decade is affected.

Check your sites today

PHP’s own advisory says every PHP installation that serves web requests is at risk, whether it runs on PHP-FPM, Apache mod_php, php-cgi, FrankenPHP or LiteSpeed. Wiz showed the attack working against WordPress, Drupal and Joomla sites.

  • Upgrade to a fixed version: PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35. PHP 8.1 and older get no official release, and the PHP security team has published source patches for 7.4, 8.0 and 8.1.
  • Check the version your site really runs. Your hosting panel shows it, and so does phpversion() called from a page on the site. php -v on the command line can report a different version from the one your web server uses. OpenAI also published a checker that runs as a Codex skill.
  • If you can’t upgrade today, php.net lists steps that reduce the risk, such as lowering post_max_size and turning off session.upload_progress. The advisory calls the update the only complete fix. CISA advises taking a PHP system offline until it is patched if you can’t update it now or it runs PHP 8.1 or older.

Attackers moved first. Amazon saw an exploit attempt on 17 October, four days before the fixes came out, and CISA added both flaws to its list of vulnerabilities attackers are known to use on 26 October. Governments in Germany, France, the Netherlands, Japan, Australia and elsewhere took websites offline while they patched.

AI now finds flaws faster than teams patch them

A PHP core developer saw the first signs of the memory flaw in 2024, and the fix still took two years. The PHP Foundation calls the delay “a structural failure”, and warns that “tools now find bugs faster than ever, for defenders and attackers alike.” Amazon’s security team says AI makes it cheaper to turn a published fix into a working attack, and advises teams to measure their patch times in hours.

Every team with code on the internet now faces the same race. An AI model will find the next flaw in your code, and your own agents can find it before someone else’s do.

Point your own agents at your own code first

One agent asked to find security bugs hands back a long list, many of the items wrong, and nobody has time to check them all. Moji runs a swarm of Claude Code or Codex agents that hunts for flaws in your code and brings back only what it can prove.

  • Each finding comes with a test that shows the flaw, before a person looks at it.
  • Each fix goes back through that same test and your own CI, and a person approves it before it merges.
  • You name the systems the swarm may test. Agents get no GitHub or cloud keys, and each agent can change only its own job’s folder.
  • Every job runs inside a budget you set, priced before the work starts.
  • Moji runs on your own machines, and your agents work under their own Claude or Codex logins.

Patch PHP today. Then put your own agents to work on your code, so the next flaw reaches you first. Read how Moji works, or request access.

More from the blog