AI and security briefsSecurity
Is my server exposed to PHP2Shell, and which PHP version fixes it?
Published Updated Editorial policy
Yes, if PHP serves web requests on your server and runs a release older than 8.2.35, 8.3.36, 8.4.27 or 8.5.12. PHP shipped the fixes on 21 October 2026. CISA listed both flaws as exploited on 26 October. Updating is the only complete fix.
Who should act: Anyone who runs PHP behind a web server, including WordPress, Laravel and vendor apps, and cannot say which PHP version answers requests.
Update log
- : Published.
- : CISA added both CVEs to its Known Exploited Vulnerabilities catalog on 26 October, so the exploitation section changed. Added how to check your exposure, the NCSC-NL product list, Wiz's 27 October findings and PHP's 26 October Windows rebuilds. The Sophos page did not respond on 28 October and is no longer cited.
What happened
PHP released 8.5.12, 8.4.27, 8.3.36 and 8.2.35 on 21 October 2026. They fix CVE-2026-109618 and CVE-2026-109619. PHP rates both 9.2 on CVSS 4.0 and says both can allow unauthenticated remote code execution, with the highest risk in Apache mod_php, where one request can trigger the attack before any application code runs (php.net, 21 October).
The disclosure broke early. The PHP Foundation (21 October) says the CVE IDs circulated on 20 October with a wrong score of 10.0, and fixed Chainguard images appeared over six hours before the release. A Hacker News poster wrote on 22 October that he was told there was no embargo.
The sources split on exploitation. Amazon (21 October) caught a honeypot attempt on 17 October, and a researcher's report (24 October) logs 35 shells on unpatched PHP 8.4.26. CISA added both CVEs to its Known Exploited Vulnerabilities catalog on 26 October (CISA KEV catalog, 26 October). Wiz (27 October) has seen no successful end-to-end exploitation in its own telemetry, and CrowdStrike (23 October) reported none against real systems.
Sansec and Vercel say PHP 5.4 and later are affected, while PHP names only the fixed branches. Sansec and PHP also disagree on which CVE owns the upload-progress path.
Since 26 October php.net shows only Windows rebuilds with a -1 suffix for a separate Brotli flaw, CVE-2026-111497 (php.net, 26 October). The advisory for CVE-2026-115560 waits for the next release.
Who is affected
- Any PHP serving web requests below those versions, including PHP-FPM, mod_php, php-cgi, FrankenPHP and LiteSpeed (php.net).
- WordPress, Drupal, Magento, Laravel and other apps, because the bug is in the engine (Sansec, Vercel).
- PHP 8.1 and older, which PHP no longer updates, and appliances that bundle PHP. NCSC-NL lists 218 of 757 tracked products as vulnerable and 144 as fixed (28 October).
What we checked
Run on on the Mac that builds this site. Each command and its output are copied as they ran.
$ curl -s 'https://www.php.net/releases/index.php?json&version=8.[2-5]' | grep -o '"version":"[^"]*"'
"version":"8.2.35"
"version":"8.3.36"
"version":"8.4.27"
"version":"8.5.12"
$ command -v php || echo "php not installed"
php not installed
On 28 October php.net still lists the same four fixed releases as the latest on each branch. No PHP runs on this Mac, so there was nothing here to patch.
Check your exposure: PHP2Shell scanner and checker options
No page we read offers an official PHP2Shell scanner. The primary sources name these checkers and rules.
- Version checker: the fixed version is the test, so run step 1 on the host that answers web requests.
- Community scanner: NCSC-NL lists php2shell-guard, which finds local PHP installs and rates them by version. NCSC-NL has not reviewed or endorsed it.
- Detection rules: CISA's SIGMA rule (23 October), Cloudflare's managed rule IDs and Vercel's WAF rules.
Wiz (27 October) found tools branded PHP2Shell that never attempted either flaw. Read any scanner's code before you run it and aim it only at hosts you own.
What to do now
- Find the PHP that answers web requests.
php-fpm -v apachectl -M | grep php - Update to a fixed release or your vendor's package, restart PHP-FPM or Apache and confirm the CVE in the changelog. On Windows take the -1 rebuilds.
zgrep CVE-2026-109618 /usr/share/doc/php8.3-common/changelog.Debian.gz - On 8.1 or older, move to a supported branch or a vendor backport.
- If you cannot update today, set these in the FPM pool or server config, not ini_set(), and restart workers. PHP says they reduce exposure and do not make a server safe. Use 32M if you take uploads.
php_admin_value[memory_limit] = -1 php_admin_flag[session.upload_progress.enabled] = off php_admin_value[post_max_size] = 8M - Hunt from 17 October for shells under the web user and new PHP files. If anything matches, rotate every secret that worker could read.
ps -eo user,ppid,cmd | grep -E 'www-data|apache|nginx' | grep -E 'sh -c|/bin/sh' find /var/www -type f -name '*.php' -newermt 2026-10-17
What should have been in place
- An inventory of every PHP runtime, host, image and vendor site, each with an owner, which CISA asks for because PHP is often a component of other software.
- Patch windows measured in hours for critical flaws. Amazon says a 7-day or 30-day window assumes a delay that no longer exists.
- Web workers that cannot spawn shells or write to web folders, with an alert when they try.
Questions people ask
Is there a PHP2Shell scanner or checker I can run?
Not an official one in the sources we read. The fixed version is the check. NCSC-NL lists a community checker, php2shell-guard, that it has not reviewed, and CISA published a SIGMA rule for logs. Some tools branded PHP2Shell never test the flaws, says Wiz.
Does setting session.upload_progress.enabled to 0 protect me from PHP2Shell?
Only in part. PHP lists it as a mitigation for CVE-2026-109619 and says only an update is complete, and watchTowr calls .ini changes ineffective. PHP added CVE-2026-115560 on 23 October and advises keeping the setting off until the next bugfix release.
Is PHP2Shell being exploited in the wild?
Sources disagree. CISA lists both CVEs as known exploited since 26 October, and Amazon and a researcher report attempts and shells. Wiz and CrowdStrike report no confirmed successful exploitation of real systems. Patch either way.
Digiton's production review starts by listing what runs where, runtimes and versions included, and the checks it runs are on the vibe coded app audit page.
How this brief was made: researched from the sources below, drafted with AI assistance and checked against each source on the dates shown. See the editorial policy.
Sources
- PHP.net, security advisory of 21 October and informational advisory of 23 October, 21 October 2026, read 28 October 2026. https://www.php.net/archive/2026.php
- The PHP Foundation, the security release and the leak, 21 October 2026, read 28 October 2026. https://thephp.foundation/blog/2026/10/21/todays-php-security-release-and-how-were-strengthening-php-security/
- PHP, php-src security advisory for CVE-2026-109618, 21 October 2026, read 28 October 2026. https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w
- Vercel, PHP security bulletin, 21 October 2026, read 28 October 2026. https://vercel.com/kb/bulletin/php2shell-security-bulletin
- watchTowr, report of exploitation and the limits of .ini mitigations, 21 October 2026, read 28 October 2026. https://watchtowr.com/intelligence/php-remote-code-execution-php2shell/
- Amazon Threat Intelligence, exploitation seen before disclosure, 21 October 2026, read 28 October 2026. https://aws.amazon.com/blogs/security/amazon-threat-intelligence-identifies-php2shell-exploitation-prior-to-public-disclosure-in-madpot/
- Cloudflare, protections against php2shell, 21 October 2026, read 28 October 2026. https://blog.cloudflare.com/php-vulnerabilities-waf-protection/
- CISA, alert on critical PHP vulnerabilities, 21 October 2026, read 28 October 2026. https://www.cisa.gov/news-events/alerts/2026/10/21/critical-vulnerabilities-php-require-immediate-patching
- CrowdStrike, obstacles to widespread exploitation, 23 October 2026, read 28 October 2026. https://www.crowdstrike.com/en-us/blog/obstacles-to-weaponizing-php2shell-likely-constrain-exploitation/
- Sansec, PHP2Shell analysis and temporary mitigations, 21 October 2026, read 28 October 2026. https://sansec.io/research/php2shell
- Researcher honeypot report of confirmed shells, 24 October, 24 October 2026, read 28 October 2026. https://github.com/0x4D31/honeypot-data/blob/main/reports/php2shell/2026-10-24-confirmed-rce.md
- Hacker News, post about the PHP embargo, 22 October 2026, read 28 October 2026. https://news.ycombinator.com/item?id=50193416
- CISA, Known Exploited Vulnerabilities catalog, entries for CVE-2026-109618 and CVE-2026-109619, 26 October 2026, read 28 October 2026. https://www.cisa.gov/known-exploited-vulnerabilities-catalog
- Wiz, PHP2Shell exploitation attempts and exposure trends, 27 October 2026, read 28 October 2026. https://www.wiz.io/blog/php2shell-exploitation-so-far
- NCSC-NL, php2shell repository with the product list and community tools, read 28 October 2026. https://github.com/NCSC-NL/php2shell
- CISA, SIGMA rules repository, read 28 October 2026. https://github.com/cisagov/SIGMA_Rules
More briefs
How these briefs are sourced and corrected. All AI and security briefs
Building something that has to hold up in production?
Start with a free 25-minute scoping call. If it fits, the first paid step is a production review: five working days on your real repository, scored against ten layers, with a costed fix list.
Book a 25-minute scoping call