Public PHP exploits: hosts must patch now
On 21 October the PHP project closed two critical flaws that let attackers run code on web servers without login. Two research teams found the PHP2Shell flaws with AI models, and public exploits already exist. The update only helps where a hosting provider, distribution or in-house team replaces the runtime. Nearly every version since PHP 5.4 is affected, and the PHP project has not released a patched version for PHP 7 or PHP 5.
Key takeaways
- The flaws known as PHP2Shell have a CVSS score of 9.2 and affect every PHP installation that serves web requests. Risk is highest with Apache and mod_php, where a request without login triggers the attack before any application code runs.
- Responsibility lies with whoever operates the PHP runtime. With managed and shared hosting, the provider installs the update; on your own servers, the packages come from the distribution or the LTS vendor.
- About 35 percent of PHP websites run on major versions for which no patched release is available. The PHP security team provides only minimal source code backports for 7.4, 8.0 and 8.1.
Update, 22 October 2026: Security authorities in Europe and the US now advise taking vulnerable systems offline. The situation report: PHP flaws: security authorities recommend shutting systems down.
Related: Simon Gooch: AI agents need a tested stopping mechanism · When purchased AI routers inject malicious code
The timeline of 21 October
The PHP security team had announced the update on 20 October for the following day at 14:00 UTC. In case details surfaced early, it reserved the right to publish sooner. The advisories for the two flaws appeared on 21 October at 13:34 UTC on GitHub. Before the release, PHP core developer Gina Peter Banyard wrote that the only countermeasure was to patch or update PHP.
Versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35 close the flaws. The PHP project advises all users to update immediately. RUS-CERT at the University of Stuttgart reported publicly available exploits the same day. It verified one of them on a test system, and attacks on vulnerable systems on the internet had already been observed. In a cybersecurity warning, the BSI (Federal Office for Information Security) recommended installing the update without delay. At that time the BSI knew of no confirmed exploitation, but it did have unconfirmed reports of existing exploits.
The PHP flaws landed in the same week as an incident at the certificate authority eMudhra. Mozilla and Google withdrew trust from one of its roots because eight intermediate certificates carried keys that could be reconstructed almost instantly.
What is remote code execution? Remote code execution, RCE for short, describes vulnerabilities that let attackers run their own program code remotely on someone else’s system. The current PHP flaws require no login for this. With Apache and mod_php, a web request triggers the attack before any application code runs.
Wiz and Calif found the flaws with AI
The story goes back two months. According to its own timeline, the Wiz Research team discovered the first flaw on 19 August, using Wiz Atlas and the AI models Gemini 4 Argon and GPT-5.6 Sol. A day later Wiz confirmed unauthenticated code execution against Drupal, on 21 August against WordPress. The exploit also worked against Joomla. Even a simple Hello World application on an affected PHP version can be vulnerable, according to Wiz. On 24 August Wiz reported the flaws to the PHP security team, which confirmed the reports on 21 September and began a coordinated fix. Wiz named the exploit script that chains both flaws php2shell.
Calif also ran into one of the flaws. According to OpenAI, Calif found it as part of the OpenAI initiative Patch the Planet using GPT-5.6 Sol, while Wiz discovered and reported both vulnerabilities independently. OpenAI says that over the past two months it led a coalition of maintainers, researchers and security vendors. The fixes and the release were owned by the PHP maintainers. The company counts the flaws among the most consequential security problems of recent times. As far as it knows, AI found them before attackers did.
Two flaws in memory
The PHP project rates both vulnerabilities 9.2 on the CVSS v4.0 scale. The scale ranks severity from 0 to 10. CVE-2026-109618 concerns how PHP handles memory exhaustion. PHP can be interrupted while internal request data has only partly been created. Request cleanup then treats the invalid data as valid. The memory can be exhausted through multipart requests, web requests made up of several parts such as file uploads, which seemingly stay within PHP’s limits.
CVE-2026-109619 concerns internal state that survives a request after its memory has been freed. A later request to the same worker, the same PHP process, can use this stale state before normal initialisation resets it. With a deliberately crafted memory layout this turns into code execution.
Every PHP installation that serves web requests is at risk, whether via PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP or LiteSpeed. The project sees the highest risk with mod_php, the PHP module loaded directly into Apache. An exploit has been demonstrated there in which a request without login triggers the attack before any application code runs. For CVE-2026-109618 a full exploit against PHP-FPM is still missing, but source code analysis indicates that PHP-FPM is vulnerable. For CVE-2026-109619 the project has confirmed code execution against PHP-FPM as well, though it requires a suitable operation in the application. For the first flaw, source code analysis suggests FrankenPHP, like mod_php, is likely exploitable regardless of the application.
Who applies the patch
Linux distributions and LTS vendors that maintain older version lines beyond the official end of support received the patches in advance. Operators should check with their vendor for updated packages. With managed and shared hosting the provider installs the update, and there the open question is the schedule. For your own servers, the recommendation is to plan a maintenance window shortly after publication.
Ubuntu rates CVE-2026-109618 with the priority “Critical”. On the afternoon of 21 October the PHP packages for the supported Ubuntu releases still showed “Needs evaluation”. A few hours later corrected packages were available for Ubuntu 22.04 LTS, 24.04 LTS, 26.04 LTS and 26.10, and operators install them via the normal package manager. For older LTS releases from 14.04 to 20.04 the fix is available through Ubuntu Pro.
Workarounds with limited effect
Anyone who cannot update immediately can contain individual attack paths. Measures to limit these attack paths include setting memory_limit=-1 via php_admin_value, using a low post_max_size value and setting session.upload_progress.enabled=0, restarting every worker after each change. The PHP project makes clear that these measures do not make an installation safe. Only the update is a complete solution.
In RUS-CERT’s assessment the published countermeasures are not enough to run a publicly reachable PHP application. In Advisory 2026-018, CERT-EU advises organisations that cannot patch immediately to consider separating internet-facing applications from the public network until the fix has been applied and verified.
Cloudflare customers get an extra layer of protection. Since 21 October at 03:02 UTC the provider has deployed rules against PHP2Shell in its Web Application Firewall. This WAF inspects web requests before they reach the server. The rules apply automatically in every plan with the WAF enabled, including the free one. Cloudflare says it has already observed attack traffic against customers and attempts to sneak attack patterns past the rules. Customers should still patch. According to Cloudflare, updating the website code or plugins alone does not fix the flaws.
Migration considerations for older branches
PHP runs on about seven in ten websites whose server-side programming language is known. Just under two thirds of these PHP websites run version 8. About 35 percent run on major versions 7 and 5, for which the PHP project has not published a patched release.
Only the branches 8.2 to 8.5 receive regular updates. Support for PHP 8.1 ended on 31 December 2025, that for 8.0 and 7.4 years earlier. Because of the severity of the flaws, the PHP security team nevertheless provided minimal source code backports for 7.4, 8.0 and 8.1, fixes ported to older branches. They are aimed at operators who build from source themselves or have no LTS vendor. Some distributions and LTS vendors also ship backported fixes.
For branches before 7.4 the security team has provided no backport. These branches are affected too: according to Wiz, nearly every PHP version back to 5.4 contains at least one of the two flaws. The oldest branch still maintained, 8.2, receives security support only until 31 December 2026.
Frequently asked questions
Every question starts closed. One tap unlocks the answer.
Does hiding PHP error messages help?
No. Neither error_reporting nor display_errors nor the @ operator protects against the two flaws. Only updating the runtime is a complete solution.
What about users of the rpms.remirepo.net package archive?
The volunteer-run archive receives no updates on 21 October. The PHP project advises its users to switch to their distribution’s packages or build PHP themselves.
How long will the patched branches keep receiving security updates?
PHP 8.2 receives security support until 31 December 2026, PHP 8.3 until 31 December 2027. PHP 8.4 is covered until 31 December 2028, PHP 8.5 until 31 December 2029.
Editor’s Picks
Editor’s PickGoogle and Apple Trusted Guessable eMudhra KeysEditor’s PickWhen the Security Stack Outgrows the Strategy
More from the MBF Media Network
cloudmagazinGoogle counters Meta with top AI at half the priceDigital ChiefsMicrosoft: Germany Is EU’s Top Cyberattack Target
Image source: AI-generated (October 2026)
Translated from the German original using artificial intelligence. The German version is authoritative.



