Developing story. The disclosure is a day old and vendors still disagree on some points, most importantly whether attacks are already succeeding. Version numbers below match the PHP release of 21 October 2026. Confirm them against the official PHP security advisory and your OS vendor before acting.
At a Glance
CVE-2026-109619
8.3.36 · 8.2.35
CVSS v4.0, drawn to scale
Both CVEs sit deep in the critical band (9.0 to 10.0)
Marker position: 20 + 9.2 × 60 px on a 0–10 scale, so the drawing is to scale.
Why an Engine Bug Is Everyone's Bug
PHP is not one technology among many on the web. It is the default. According to W3Techs, 70.2% of all websites whose server-side language can be identified run PHP, more than every other server-side language combined. WordPress, Drupal, Joomla, Magento, Laravel and Symfony all run on it, along with a long tail of internal tools, hosting panels and vendor appliances that bundle their own copy.
How much of the web runs on PHP
Share of websites by server-side language, where the language is known
Source: W3Techs, 27 August 2026; top-1M figure from its June 2026 report. "Everything else" is the remainder.
Normally a PHP vulnerability is somebody's application bug, and your exposure depends on whether you run that app.
PHP2Shell breaks that assumption. Both flaws sit in the Zend engine and request handling, below every framework. Your code review, your WAF rules for WordPress plugins, your dependency scanner: none of them look at the interpreter binary.
Where the bug sits in your stack
Hardening the layers above does not remove a flaw in the layer they all run on
What PHP2Shell can cause
The technical result is code execution as the web worker. In business terms, that one primitive opens up every outcome below. Which ones are realistic depends on what the server holds and what it can reach (the blast-radius section further down goes deeper).
Why the score is 9.2, not 10
CVSS v4.0 scores a bug from a set of base metrics. The PHP security team rated both CVEs 9.2. Identifiers that circulated before the official release carried a 10.0, which the PHP Foundation says was incorrect. The vector reported for both CVEs explains the gap:
The CVSS v4.0 metrics behind 9.2
Red pushes the score up, amber holds it below the maximum
Reported vector: AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H. Confirm against the NVD entry once it is published.
In plain words: everything about who can attack is as bad as it gets (anyone, remotely, with no login and no victim action), and so is the impact. The only things keeping it off a perfect 10 are that exploitation takes skill and depends on certain conditions. That is cold comfort here: upload progress is on by default, and AI tools are lowering the skill barrier, as the discovery story below shows.
Why governments said: patch now, or take it offline
On 21 October, CISA published an alert strongly urging organisations to patch both CVEs immediately. According to reports, the NSA went further and told organisations to patch or take vulnerable systems offline, and the UK's National Cyber Security Centre gave similar advice. Government and corporate websites in several countries went dark as a precaution. Advice that blunt is rare. Here is why it was given:
Taking a site offline is a risk decision, not panic. A few hours of downtime costs far less than a breach, a card-skimming incident or a ransomware foothold. If you cannot patch or apply the workarounds today, block public access to the PHP application until you can.
Under the Hood: The PHP Request Lifecycle
To see why this is so dangerous you need two facts about how PHP serves requests.
Fact 1: workers are reused. Under PHP-FPM a master process keeps a pool of long-lived worker processes. Each worker handles request after request (until pm.max_requests recycles it). PHP's "shared nothing" model is supposed to reset per-request state at shutdown, so request N cannot affect request N+1. Anything that survives that reset is shared, and that is the crack PHP2Shell uses.
Fact 2: some engine code runs before your script. When a multipart/form-data POST arrives, PHP parses the body (its RFC 1867 upload handler) during request startup. If session.upload_progress.enabled is on, which is the default, and the body carries a field named after session.upload_progress.name (default PHP_SESSION_UPLOAD_PROGRESS), the session module starts writing upload progress into the session while the body is still being read. No line of your application has executed yet.
One request through PHP-FPM
The red steps are reachable by an anonymous attacker before your code runs
$_POST / $_FILES.Abnormal endings are the trigger
When PHP hits a fatal error, including "Allowed memory size exhausted", it does not unwind politely. The engine bails out of the current execution (internally a setjmp/longjmp-style jump) and skips straight to shutdown. Code that was halfway through updating a structure never finishes. If a pointer was freed but not cleared, or a global flag was never reset, shutdown and the next request inherit it.
That is the class of bug both CVEs belong to (CWE-824, use of an uninitialized or stale pointer). The researchers credited with the discovery describe several memory safety issues across session handling, OPcache class caching and fatal-error backtrace generation, all reachable by forcing a request to end abnormally. Three of the five exploitation techniques they demonstrated use the upload-progress feature as the remote trigger.
"The application never gets a vote. The dangerous path starts during request startup and ends in a worker that will happily serve the next customer."
Why PHP2Shell is unauthenticated by designThe PHP2Shell attack chain
Conceptual flow only: no exploit steps, no payloads
www-data or apache.The Two CVEs Side by Side
memory_limit exhaustionsession.upload_progress.enabled = 0; on 8.5 also fatal_error_backtraces = 0What an Attacker Gets
Code execution as the PHP worker is the entry point, not the end state. How far it goes depends on how the host was built.
Blast radius, from the engine outward
Typical post-exploitation reach. An illustration, not a measurement
The disclosure half matters on its own: data from other requests in the same worker can leak even where code execution is blocked.
Am I Exposed?
Upstream PHP fixed the four supported branches. Everything older gets no fix from the PHP project, and that includes the PHP 5 and 7 lines that still run plenty of production sites.
Patch status by branch
Upstream php.net releases of 21 October 2026
php -v, for example 8.3.34. Runs in your browser; nothing is sent anywhere.Distro packages break naive version checks. Debian, Ubuntu, RHEL and AlmaLinux backport security fixes without bumping the upstream version, so php -v may print an "old" number on a patched host, or a "new-looking" one on an unpatched build. On distro packages, check the package changelog for the CVE IDs (commands below) instead of trusting the version string. AlmaLinux, for example, shipped patched packages for every PHP stream on 8, 9 and 10 on 21 October.
Timeline
How it unfolded
Found With AI: What PHP2Shell Says About Vulnerability Research
PHP2Shell was not found by a lone researcher reading C code late at night. It was found with the help of AI systems built by private technology and security companies, and it was found twice. As of 22 October 2026, reports credit two independent discoveries, one by Calif and one by Wiz, alongside research by OpenAI.
Two AI-assisted discoveries, one bug
Independent teams, overlapping AI tooling, the same flaw in the PHP engine
Why this matters more than the bug itself
Memory-safety bugs in a 30-year-old C interpreter are not new. What is new is how they were found. Reaching a stale pointer through an abnormal end of request, across session handling, OPcache and fatal-error paths, is exactly the kind of cross-module state reasoning that has traditionally needed a senior researcher and weeks of fuzzing harness work. Here, two separate teams got there with AI assistance.
- It is a research capability now, not a code-review feature. These models did more than flag a suspicious line in a pull request. They helped find exploitable conditions in a mature, heavily reviewed runtime.
- Independent rediscovery is a warning sign. When two teams find the same bug at about the same time, the bug was within reach. Anyone else with similar tooling, including attackers, may have been close too.
- The same capability cuts both ways. AI that helps find a flaw can also help turn a public patch into a working exploit, by diffing the fixed and unfixed source and reasoning about the trigger. The gap between "patch released" and "exploit available" keeps shrinking.
- Scale raises the stakes. Palo Alto Networks reports more than 22.6 million exposed instances potentially affected. At that size, even a small exploitation rate is a large number of compromised servers.
Key takeaway: AI-assisted vulnerability discovery has become a practical security research capability, not just a code-review feature. For defenders, the consequence is simple: patch windows measured in weeks are no longer safe. Assume capable adversaries can use similar AI tools to build exploits from a published fix, and plan to patch internet-facing runtimes in days, or hours for critical engine bugs like this one.
The practical response is the same one the rest of this post builds toward: know where every runtime is, be able to roll a patched binary fleet-wide quickly, and contain each worker so that one compromised process cannot take the network with it.
Detection: Find What Is Vulnerable
Because the flaw is in the runtime, you find it by inventory and configuration, not by scanning application code. Start with what runs where.
1. Inventory every runtime
# on a host: the CLI and the FPM binary can differ
php -v
php-fpm -v # may be php-fpm8.3, php-fpm82, ...
# every running container and its PHP
docker ps --format '{{.Names}} {{.Image}}'
docker exec <container> php -v
# kubernetes: list images that look like PHP
kubectl get pods -A -o jsonpath='{range .items[*]}{.spec.containers[*].image}{"\n"}{end}' \
| sort -u | grep -iE 'php|wordpress|drupal|laravel|magento'
2. On distro packages, check the changelog, not the version
# Debian / Ubuntu: installed PHP packages and whether the fix is in
dpkg -l 'php*' | awk '/^ii/ {print $2, $3}' | grep -E 'fpm|common|cli'
apt changelog php8.3-common 2>/dev/null | grep -E 'CVE-2026-10961[89]'
# RHEL / AlmaLinux / Rocky
rpm -q --changelog php-common | grep -E 'CVE-2026-10961[89]'
3. Check the risky settings in the web context
php -i | grep -E 'upload_progress.enabled|^memory_limit|fatal_error_backtraces'
# overrides in pool, ini and .user.ini files
grep -RnE 'memory_limit|upload_progress|fatal_error_backtraces' \
/etc/php* /usr/local/etc/php* 2>/dev/null
The CLI often loads a different php.ini than FPM or Apache. Confirm the values the web workers actually use, for example with a temporary phpinfo() page restricted to your IP, deleted straight afterwards.
4. Hunt for signs of attempted exploitation
These are generic signals I would check, based on how the bugs work. None is a confirmed indicator of compromise and each has benign causes. Use them to prioritise, then investigate.
SIGSEGV or abnormal worker exits in PHP-FPM or Apache logs, and bursts of memory-limit fatal errors.curl, wget or package tools.# crash and memory signals in FPM logs (path varies by distro)
grep -E 'SIGSEGV|exited on signal|Allowed memory size' /var/log/php*-fpm.log
# PHP files changed since 19 Oct under the web root
find /var/www -name '*.php' -newermt '2026-10-19' -ls
# processes owned by the web user that are not php-fpm
ps -o user,pid,ppid,cmd -u www-data | grep -v php-fpm
# where sessions live (look for large, recently written files)
php -r 'echo ini_get("session.save_path"), PHP_EOL;'
Mitigation, in Priority Order
Response ladder
Work top to bottom. Patching is the only complete fix
open_basedir, egress filtering from the web tier, and secrets kept out of files the worker can read.Temporary workarounds
; CVE-2026-109618: pool file, e.g. /etc/php/8.3/fpm/pool.d/www.conf
; php_admin_value cannot be overridden by ini_set() in application code
php_admin_value[memory_limit] = -1
; Apache mod_php equivalent, inside the vhost:
; php_admin_value memory_limit -1
; CVE-2026-109619: php.ini or a conf.d override
session.upload_progress.enabled = 0
; PHP 8.5 only: stop generating backtraces on fatal errors
fatal_error_backtraces = 0
My caution on memory_limit = -1: with no PHP limit, one runaway request can eat the host. Pair it with a hard cap outside PHP, such as a container memory limit, a systemd MemoryMax= on the FPM service, or a cgroup limit, and keep the workaround short-lived. Disabling upload progress only breaks upload progress bars, so it is the cheaper of the two.
; run as a dedicated, unprivileged user per site
user = site1
group = site1
; confine filesystem access to the app and temp dirs
php_admin_value[open_basedir] = /var/www/site1:/tmp
; recycle workers so leaked state does not live forever
pm.max_requests = 500
; trim process-spawning functions if your app does not need them
php_admin_value[disable_functions] = exec,passthru,shell_exec,system,proc_open,popen
pm.max_requests is not a fix, but a lower value shortens how long any state left behind by an aborted request can survive in a worker. Test disable_functions carefully: some CMS features and plugins depend on proc_open or exec.
Your 24-Hour Checklist
Inventory every PHP runtime
Hosts, containers, Kubernetes images, hosting panels and appliances with bundled PHP.
Patch and restart
Fixed upstream release or distro package confirmed by changelog, then every worker restarted.
Workarounds where you can't patch
Upload progress off, memory ceiling handled with an outer cap, backtraces off on 8.5.
Hunt on internet-facing hosts
Crashes, new PHP files since 19 October, worker child processes, unusual egress.
Rotate secrets if exposure is likely
Database credentials, API keys, application and session secrets readable by the worker.
Put a date on every legacy PHP
PHP 5, 7, 8.0 and 8.1 get no upstream fix. Each needs an owner and a migration deadline.
Key Takeaways
- It is an interpreter bug. Application hardening does not help; replacing the binary and restarting workers does.
- Pre-auth by construction. The trigger path runs during request startup, before any of your authentication code.
- Reused workers are the force multiplier. State left by one aborted request can be read by the next.
- Version strings lie on distro packages. Verify by changelog and CVE ID.
- Legacy PHP is now a live liability. No upstream fix exists for 8.1 and older.
- AI found it, and AI can weaponise it. AI-assisted discovery is now a practical research capability. Patch fast, because attackers have similar tools for turning fixes into exploits.
Sources
- JFrog Security Research: PHP2Shell, all you need to know
- BleepingComputer: PHP ships emergency patches for critical PHP2Shell flaws
- Imperva: PHP2Shell vulnerability updates
- watchTowr: PHP Remote Code Execution (PHP2Shell)
- Sophos advisory: PHP2Shell vulnerabilities
- AlmaLinux: patched PHP packages released
- Datadog Security Labs: detection, analysis and remediation
- SOCRadar: PHP2Shell, CVE-2026-109618 and CVE-2026-109619
- CISA: Critical vulnerabilities in PHP require immediate patching
- ETCISO: Websites go dark worldwide as AI exposes critical security flaws
- The Record: Hundreds of websites taken offline over two PHP vulnerabilities
- Malwarebytes: Why websites are going offline for emergency updates
- Tenable: PHP2Shell frequently asked questions
- W3Techs: Usage statistics of server-side programming languages
- CNN: AI helped find a critical security flaw in PHP
- Fortune: AI tools discovered the PHP vulnerability, now the race is on to patch
- CyberScoop: PHP releases emergency fixes for 2 critical vulnerabilities
- TechTarget: 22M exposed servers at risk
Written for defenders. This post contains no exploit steps and no proof of concept. Configuration values come from the sources above; confirm them against the official PHP advisory for your exact version and platform.


