ForgeNEX

PHP2Shell: critical flaws in PHP found with AI and what to do now

Two critical vulnerabilities in PHP, discovered with the help of AI, affect WordPress, Drupal and Joomla. We tell you how to protect your SMB.

4 min read

In this article

The PHP ecosystem powers approximately 70% of the world's websites, according to Wiz Research. That is why, when vulnerabilities appear in its core engine, the impact goes far beyond a single application. Last week, two critical vulnerabilities, dubbed PHP2Shell, were made public; they were discovered with the help of state-of-the-art AI models. The flaw, which affects all PHP versions from the last decade, allows an attacker to execute code without authentication in content management systems such as WordPress, Drupal and Joomla. The news came alongside a proposal from OpenAI to manage the growing tide of flaws that AI is helping to find.

The technical details are complex, but any SMB with a web presence should know about them. The vulnerabilities, registered as CVE-2026-109618 and CVE-2026-109619, score 9.2 out of 10 on the CVSS v4.0 scale. The problem lies in PHP's error handling: when a request exhausts memory or fails, the engine can leave references to already freed memory. If the next process reuses those references, an attacker could access sensitive data or execute malicious code. These memory safety errors, such as use-after-free and type confusion, had gone undetected for years because exploiting them required combining several weaknesses in a very subtle way.

Detalle ilustrativo: AI found flaws in the code behind 70% of the web. The fix took two months.

AI accelerates flaw discovery

What would previously have required months of work by a team of experts can now be achieved by a single researcher with cutting-edge models in approximately one week. Wiz describes the finding as a turning point in the use of AI for security. Tools such as GPT-5.6 Sol from OpenAI or Gemini 4 Argon from Google have made it possible to identify these vulnerabilities that had lain dormant for years. Raluca Ada Popa, head of Gemini Security at Google DeepMind, states that cutting-edge AI is a game changer for cyberdefense. However, the same technology can also be used by attackers to find weak points first.

The timeline of the discovery and the coordination for the patch is also relevant. Wiz found the first flaw on August 19 and confirmed unauthenticated code execution against Drupal the following day. On August 21 it demonstrated the same against WordPress, and on August 24 it reported the flaws to the PHP security team. This team acknowledged the reports on September 21 and began building a coordinated solution. The patched versions arrived on Wednesday, the same day the details were made public. Cloudflare, Google Cloud, AWS, Microsoft and Akamai, among others, took part in the coordination.

What it means for your SMB

If your company has a website on WordPress, Drupal or Joomla, or uses PHP in any internal application, this flaw affects you directly. The good news is that patches are already available. The bad news is that attackers are also aware and have begun modifying their attacks to evade protections. Cloudflare, for example, began protecting its customers by default about nine hours before the public announcement and observed attack traffic targeting those customers. The company was clear: customers must patch their PHP repositories. Firewall rules can block exploitation attempts, but they do not eliminate the underlying vulnerability.

Therefore, the main recommendation is clear: update PHP as soon as possible. If you do not have your own technical team, contact your hosting provider or development agency to apply the patches. Do not rely solely on the web application firewall (WAF) as a single solution. Also, check whether your content management system and plugins are up to date. The vulnerability affects all PHP versions from the last decade, including code dating back to PHP 5.4, so even seemingly old systems may be vulnerable.

This incident also leaves us with a lesson about the importance of error handling in secure development. AI is democratizing flaw discovery, and that is good for defense, but it also increases the pressure on SMBs to keep their systems up to date. At ForgeNEX we recommend establishing a periodic process for updating and reviewing dependencies, as well as training your team in basic security practices. If you need help assessing your exposure, do not hesitate to contact us.

OpenAI's proposal for a five-stage framework to manage critical vulnerabilities discovered by AI is an interesting step, but it is still in the discussion phase. In the meantime, the responsibility for protecting systems falls on each organization. Do not wait until it is too late.

Source: The New Stack. Analysis and adaptation: ForgeNEX.

Keep reading