The PHP2Shell vulnerability is the name the trade press gives to two remote code execution flaws in the PHP engine. The official php-src advisories, published on 21 October 2026, list them as CVE-2026-109618 and CVE-2026-109619, both rated “Critical” (CVSS v4: 9.2). The fixes ship in PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12. The SRE question is simple: which machines in my estate still run an earlier version?
This article sticks to facts read in the PHP project’s advisories, then offers a method: inventory versions, verify fixes, watch for signs of exploitation. The “PHP2Shell” name comes from secondary sources; it does not appear in the advisories we read. span.observer has neither reproduced the flaw nor tested any exploit.
PHP2Shell vulnerability: what the official advisories say

- GHSA-w8hw-w9fx-j79w (CVE-2026-109618): PHP uses
longjmp()to leave a request when memory runs out. If an allocation fails while request memory is reachable but not initialised, request shutdown reads invalid state, which can lead to unauthenticated remote code execution with the web worker’s privileges. The fix removes thislongjmp(). - GHSA-6wmf-4rv5-p3rp (CVE-2026-109619): global state kept by a worker points to memory already freed (use-after-free, CWE-416). The best-confirmed case involves
fatal_error_backtraceson PHP 8.5 with mod_php; a second case involves session upload progress, validated with mod_php and FPM. - Fixed versions: 8.2.35, 8.3.36, 8.4.27 and 8.5.12; the advisories list earlier versions of those branches as affected. The PHP changelog dated 22 October 2026 cites both advisories for 8.5.12 and 8.4.27.
- Exposure: according to the advisory, Apache mod_php and FrankenPHP are the most exposed; FPM and LSAPI are likely susceptible.
The 9.2 score comes from the vector CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H: network-reachable, but high attack complexity.
What remains uncertain
Sources diverge on exploitation. Some press articles report attacks before the patch was published; others describe an exploit built by researchers afterwards. The advisories establish neither claim. We therefore cite no exploitation detail, no signature and no count of affected machines. For branches 8.1 and earlier, we found no fixed version in the advisories: ask your distribution whether it backports the fixes.
Inventory the PHP versions across your estate
A useful inventory answers four questions: which machine, which process, which version, which package. Start with what is simple and verifiable.

- CLI:
php -vorphp -r 'echo PHP_VERSION;'. On this workstation the output was 8.3.6, earlier than 8.3.36, so such a host would need patching. - The real service:
php-fpm -v, orapachectl -M | grep -i phpfor mod_php. The CLI binary is not the PHP serving your requests. - Containers: read the version in each base image; a container ships its own copy of PHP.
- Distribution: compare the fix, not just the number.
rpm -q --changelog php | grep CVE-2026-1096orapt changelog php8.3-fpm | grep CVE-2026-1096shows whether the package cites these identifiers (package names vary).
To check the interim workarounds, read the live values: php -r 'var_dump(ini_get("session.upload_progress.enabled"));'. In our example the value is “1” (enabled). Read it from the service configuration (FPM, Apache), not only the CLI. The advisories state that updating remains the only complete fix.
Monitor: metrics and time to patch
Turn the inventory into a metric. With node_exporter, the “textfile” collector reads .prom files from the --collector.textfile.directory folder. A scheduled script can write:
php_version_info{version="8.3.6",sapi="fpm",host="web-01"} 1
You get the number of hosts per version and an alert when a version earlier than the fixed ones remains after a set delay. The same data can go over OTLP to Dynatrace SaaS, Dynatrace Managed or another tool: see OpenTelemetry and Prometheus, complementary and Prometheus with Dynatrace on Kubernetes. Set a patching SLO, for example “95% of exposed hosts patched within 7 days”; see choosing your SLIs. In Dynatrace, check the documentation for how to list PHP processes in your environment before relying on it: we have not validated an inventory query.
On the platform side, see also Application Security and vulnerabilities. For a neighbouring case, see the SUSE PHP flaw of October 2026.
Detect possible exploitation in your logs
The advisories publish no indicators of compromise, so these are general hunting ideas, not signatures. A web process should not start a command shell: look at the child processes of php-fpm, apache2 or httpd, for example with ps -eo pid,ppid,user,args --forest, or with an auditd rule on execve for the worker user. Also watch for abnormal worker restarts (SIGSEGV in system logs), spikes of large multipart requests and recently created files in folders the worker can write to. A crashing worker is not proof of attack, but it is a starting point to correlate.
How to check that it works
- Update a test machine to a fixed version, then restart PHP-FPM or Apache.
- Rerun the inventory: the new version appears.
- Check that
php_version_infochanges in your tool and that the alert closes.
Best practices
- Read the php-src advisories and the changelog, not just the press.
- Prioritise Internet-facing servers, especially mod_php.
- Restart services: a loaded worker keeps the old code.
- Cite no exploitation detail without a primary source.
Frequently asked questions
Which PHP versions fix the PHP2Shell vulnerability?
According to the php-src advisories of 21 October 2026: 8.2.35, 8.3.36, 8.4.27 and 8.5.12. Earlier versions of those branches are affected.
Is updating WordPress or my CMS enough?
Not by itself: the flaw is in the PHP engine, not the application. Update PHP (or your distribution’s package).
Do I need to restart after updating?
Yes: restart PHP-FPM or the web server so workers load the fixed code.
Conclusion
Facing the PHP2Shell vulnerability, measure before assuming: inventory, fixed version, patch delay tracked as an SLO. Sources: GHSA-w8hw-w9fx-j79w, GHSA-6wmf-4rv5-p3rp and the PHP changelog.
span.observer is an independent community blog, not affiliated with the PHP project or Dynatrace LLC. Trademarks belong to their owners. Information changes quickly: verify it in the official advisories.