PHP2Shell: Why two PHP vulnerabilities are taking government agencies, hospitals, and universities offline

On October 21, 2026, PHP closed two critical vulnerabilities known as PHP2Shell. On the same day, the state of Baden-Württemberg, the university hospitals of Freiburg, Heidelberg, and Mannheim, the Charité hospital, and other institutions took their websites offline as a precaution. The German Federal Office for Information Security (BSI) classified the situation as alert level 3 (orange).

For CEOs, CIOs, and CISOs, this isn't a matter of a single website, because PHP runs on WordPress, Typo3, Drupal, Moodle, e-commerce platforms, and many custom developments. Anyone using PHP—and that's most companies somewhere—is potentially affected.

Therefore, it is crucial to know which systems in your company are running PHP, which version, and who maintains them.

(Information as of October 22, 2026, morning. The situation is evolving.)

Table of Contents

This is known about PHP2Shell.

These are two memory vulnerabilities in PHP itself, not in a single CMS. According to the PHP security team, both can be exploited remotely without login or user interaction. With Apache and mod_php, the attack occurs before any application code even runs.

The PHP security team rates both vulnerabilities using CVSS 4.0. 9,2A previously circulated value of 10,0 was incorrect.

Current status of the investigation: Amazon is now observing widespread exploitation by multiple actors, while Cloudflare and watchTowr are reporting attempted attacks. A successful breach has not yet been publicly confirmed. Whether a working exploit exists is disputed: the PHP Foundation found none at the time of release, while HelpNet Security reported one.

Whoever found the gaps

The vulnerabilities were discovered twice independently, and both times with AI support:

  • Calif: Ryan Austin of the security firm Calif discovered the vulnerabilities in August 2026 as part of OpenAI's "Patch the Planet" program, supported by the OpenAI model GPT-5.6 Sol. OpenAI oversaw the coordinated remediation for approximately two months.
  • Wiz: The security company Wiz, now part of Google Cloud, independently encountered the same vulnerabilities. Wiz used its own tool, Wiz Atlas, as well as Gemini 4 Argon and GPT-5.6 Sol, and reported the vulnerabilities to the PHP security team on August 24, 2026.

Neither source specifies which of the two CVEs is based on which find.

The flaws had been embedded in the code for a long time. According to Wiz, the underlying architectural decisions date back more than ten years, with the oldest affected code originating from PHP 5.4 from 2012. OpenAI clarifies that, to their knowledge, the vulnerabilities were previously unknown.

The lesson learned: AI finds vulnerabilities that have been overlooked for a decade. This helps defenders, but the same tools are also available to attackers. The fact that an attack was launched four days before the patch, despite the embargo, shows how narrow the window of opportunity has become.

Timeline

  • 17.10.2026: Amazon registered an exploit attempt in its MadPot honeypot network four days before the release and during the embargo. How the details were leaked is unknown.
  • 20.10.2026: The CVE numbers are circulating publicly. PHP is bringing forward the security release.
  • 21.10.2026: PHP releases the patches. CERT-EU publishes Advisory 2026-018, and the BSI issues a cybersecurity warning. Government agencies, hospitals, and universities take their websites offline.
  • 22.10.2026: Facilities are rolling out updates and gradually bringing systems back online.

What happens technically, explained in understandable language.

  • CVE-2026-109618 This is a bug in how PHP handles limited memory. If PHP runs out of memory while the data for a request is not yet fully prepared, PHP still cleans up this incomplete data as if it were valid. An attacker can deliberately cause this situation.

  • CVE-2026-109619 This is a so-called use-after-free. A residual from a request points to memory that has already been released. A subsequent request to the same PHP process can then utilize this memory. Additionally, PHP confirms that memory contents can be read in this way.

    In practical terms, this means that a single, specially crafted web request can be enough to execute arbitrary code on the server. Afterwards, the attacker has access to databases, configuration files, and customer data, and the web server becomes the starting point for further attacks on the network.

Which systems are affected?

Any PHP installation that handles web requests is affected: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, and LiteSpeed. The highest risk is with mod_php. The oldest affected code found by the Calif research team was in PHP 5.4.0 (2012), which is about 14 years old. The often-cited "20 years" refers not to the exploitable code, but to the underlying class of vulnerabilities, which dates back to 2004.

 

VersionStatus
8.5.xPatched from version 8.5.12
8.4.xPatched from version 8.4.27
8.3.xPatched from version 8.3.36
8.2.xPatched from version 8.2.35
7.4 – 8.1No official release, only minimal source backports and distribution packages.
5.4 – 7.3End-of-life, no fix from PHP

 

Linux distributions and LTS providers received the patches before the official release. Users who obtain PHP from distribution packages should check for updated packages there and not rely solely on the PHP version number.

The situation in Germany

BSI: The BSI has issued a warning level 3 (orange) and advises considering a temporary disconnection of the web server from the internet if the patch cannot be installed immediately.

Baden-Württemberg: The state took numerous government websites offline, including those of ministries and regional government offices. The Ministry of the Interior classifies the vulnerability as highly critical and emphasizes that no successful attack occurred. The systems will be gradually restored after an update by the state service provider BITBW.

Hospitals and universities: The university hospitals in Freiburg, Heidelberg, and Mannheim took their websites offline; in Freiburg, this also included the website for the patient app. All three emphasize that patient care is not affected. At the University of Freiburg, the ILIAS learning platform and web access to student email accounts were affected.

Other facilities according to dpa: In Berlin, the Charité hospital, the Berlin Fire Department, and the Berlin Food Bank; the Free University and Humboldt University of Berlin warned of potential restrictions. In Brandenburg, the University of Potsdam, the Ernst von Bergmann Hospital, and the Dahme-Spreewald district issued warnings. In Mainz, the city portal mainz.de.

There is no complete official list.

Why this case is a C-level issue

These shutdowns demonstrate the high cost of a lack of transparency. Anyone unsure which systems are affected must proactively take everything offline that might be using PHP. Those with a well-maintained inventory can patch selectively and remain accessible.

In addition, there are two points that go beyond the individual case:

  • The embargo didn't hold. Attack attempts took place four days before the patch. The time between discovery and exploitation was therefore less than zero.
  • Older versions remain open. There is no fix for PHP versions 5.4 to 7.3. Every forgotten legacy installation, such as an applicant portal, an intranet tool, or an agency project, is an open door for vulnerabilities.

Economic crime and industrial espionage

A compromised web server provides precisely the data criminals use to make money: customer data for credible phishing attacks, email login credentials for business email compromise, and database passwords for the next step. If the website is connected to CRM, ERP, or single sign-on systems, it becomes the boundary between the internet and internal business processes.

The wave of attack attempts shows the typical pattern: first, a broad scan is conducted, then the promising leads are selectively expanded. Anyone who establishes access today might later see it sold to another player.

What companies should do now

The regulatory perspectiveOur sister company outlines which documents, reports, and decisions are required subsequently. ProSec Governance regulatory.

1. Clarify inventory

  • All systems on which PHP answers web requests are included, including legacy systems, test environments and agency-managed sites.
  • Determine the PHP version and operating mode (FPM, mod_php, CGI) for each system.
  • Designate a responsible person for each system.

2. Patching

  • Update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 or install the patched packages of the distribution.
  • Then restart all PHP workers. An update without a restart will not close the vulnerability.
  • Actively inquire with hosting providers and service providers and have them confirm the patch level.

3. Bridging the gap where a patch is not yet possible

  • Against CVE-2026-109618: memory_limit=-1 set without allowing applications to overwrite the value.
  • Against CVE-2026-109619: session.upload_progress.enabled=0, under PHP 8.5 additionally fatal_error_backtraces=0.
  • WAF rules, such as those from Cloudflare, are a temporary solution and only protect traffic that passes through them.
  • If none of these options are possible, take the system offline, as recommended by BSI and CERT-EU.

4. Replace old versions

  • PHP versions 5.4 through 7.3 will not receive a fix. These systems must be replaced or permanently isolated.

5. Check for compromise

  • Attack attempts were already underway before the patch. A patched system may have already been compromised beforehand.
  • Back up and analyze web server logs from October 17, 2026 onwards, searching for unknown files, web shells and new accounts.
  • In case of suspected theft, rotate access data to the database, mail and hosting.

How ProSec can help

A patch that has been installed is not proof that a system is clean. The crucial factor is whether all affected systems were found and whether anyone was logged in before the patch was applied.

  1. Inventory of the attack surface: We determine on which externally accessible systems PHP is running, in which version and operating mode.
  2. Web Application Penetration Test: We examine your PHP applications like real attackers and show which paths lead from the website further into the network.
  3. Digital Forensic Incident Response: We are investigating systems for traces of compromise since October 17, 2026, and limiting the damage if any occurred.
  4. IT Security Consulting: We will work with you to determine how older versions will be replaced and how patching processes will be faster in the future than a broken embargo.

Conclusion: Transparency determines whether you patch or shut down.

PHP2Shell affects almost every organization that runs web applications. The organizations that had to take everything offline yesterday didn't have a patching problem, but an inventory problem.

Those who know where PHP is running can patch specifically and remain accessible. Those who don't know have to shut down and still can't be sure that no one has previously compromised their system.

How do I reliably protect my company from hackers?
With the support of good hackers!

Sources

FAQ

PHP2Shell is the name given to two critical vulnerabilities in PHP (CVE-2026-109618 and CVE-2026-109619) that allow attackers to execute code on web servers without authentication. The name is similar to Log4Shell.

Yes, if WordPress is running on an unpatched PHP version. The vulnerability lies in PHP itself, not in the CMS. A WordPress update alone will not close it.

A programming error where software accesses memory that has already been released. Attackers can fill this memory with their own data and thus take over the program's execution.

The update closes the vulnerability, but only after restarting the PHP workers. Since attacks were already occurring before the patch, you should also check whether the system has already been compromised.

There is no fix for PHP versions 5.4 through 7.3. For versions 7.4 through 8.1, there are only minimal backports. These systems should be replaced or taken offline.

Newsletter Form

Cybersecurity insider access with exclusive content and early access to security-relevant information

Become a Cyber ​​Security Insider

Get early access and exclusive content!


Please accept the cookies at the bottom of this page to be able to submit the form!
OTHER CONTRIBUTIONS

Table of Contents

Do you have any questions or additions? bring it on!
Write a comment and we will reply as soon as possible!

Your email address will not be published. Required fields are marked with *.

Share your feedback and help us improve our services!

Share your feedback and help us improve our services!

Take 1 minute to give us some feedback. This way we can ensure that our IT security solutions meet your exact needs.