Update, October 21, 2026: PHP has now released patches for both vulnerabilities. This story has been updated with the fixed versions, the setups at risk and PHP’s guidance.
The PHP security team has released emergency patches for two critical vulnerabilities that can allow unauthenticated remote code execution, after details of the flaws leaked online ahead of their planned disclosure.
PHP is a popular server-side programming language which powers roughly 70% to 75% of websites whose server-side language is known, according to data from W3Techs.
According to the advisory, all PHP installations serving web requests are at risk, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP said the risk is highest for mod_php, “with a demonstrated exploit where an unauthenticated request can trigger the attack before any application code runs.”
The flaws are tracked as CVE-2026-109618, which stems from out-of-memory handling, and CVE-2026-109619, where internal request state can survive after its memory has been freed. Researchers have dubbed the pair “PHP2Shell.”
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix both flaws, and PHP said “all PHP users are strongly encouraged to update immediately.”
PHP 8.1 and older no longer receive official updates. Given the severity, though, the PHP security team published minimal source backports for PHP 7.4, 8.0 and 8.1, and said Linux distributions and LTS vendors received the patches in advance.
PHP also published interim measures for organizations that can’t update right away, including disabling the session.upload_progress.enabled setting, but warned that “there are no complete mitigations, updating is the only safe choice.”
How the flaws leaked
On Tuesday, PHP warned that fixes for the two flaws, both rated 9.2 on the CVSS v4.0 scale, would be published on Wednesday, October 21, at 14:00 UTC, a day earlier than intended.
The notice followed a post on Hacker News claiming the flaws would be disclosed on Thursday. The post was taken down, but not before screenshots spread online.
According to Ars Technica, the leaked report included a video showing an exploit tool executing code on servers running WordPress, Drupal, Magento, Joomla, MediaWiki and other PHP-based applications. The report has not been independently confirmed.
Technical details had already begun circulating before the release. A researcher on X claimed to have recreated both flaws, describing them as heap use-after-free bugs in PHP’s session upload progress handler.
Early attacks reported
The exposure could be wide. Security researcher Silas Cutler estimated that around 1.3 million internet-connected hosts are likely affected, Ars Technica reported. Security firm Mallory counted around 884,000 internet-facing hosts reporting PHP 8.1 or older, according to The Hacker News.
“We are seeing early attacks emerging and are updating mitigations as new vectors show,” Cloudflare’s Dane Knecht said on X. Cloudflare said it had deployed web application firewall rules for the known exploit vectors to all customers, including free accounts.
CERT-EU has urged organizations to identify their PHP-based applications and prepare to patch immediately, or “consider isolating internet-facing applications from public networks until a fix is available.” The Australian Cyber Security Centre issued similar guidance, though it said it was “currently not aware of active exploitation related to these vulnerabilities,” Reuters reported.
Security firms including Huntress and Wordfence also recommend that organizations assign an owner for PHP patching, inventory every PHP install (including those bundled in vendor appliances and control panels), back up sites and databases, and isolate end-of-life versions from the internet.