S-SCOTTEK← HomepageNewsGuidesBuyingTeamForumSupportlog in · sign up
self-hosting 2026-10-23

PHP Critical RCE: Patch Now (PHP2Shell Guide)

Companion guide and video starting point

This article is a companion to the video, not a replacement for it, and the video is the starting point for everything below.

Watch the video

In the video: a 296-second walkthrough treats two critical PHP remote-code bugs, collectively called PHP2Shell, as a patch-now emergency for anyone self-hosting PHP, scoring both 9.2 out of 10 and putting every PHP from 5.4 through 8.5.11 in scope, with fixed builds landing October 21st.

Added from the sources: every version number, identifier, and vendor advisory below was checked against the PHP 2026 news archive, the PHP Foundation security write-up, the CERT-EU advisory 2026-018, Synology SA-26:14, and reporting on QNAP QSA-26-18. A Prag research folder exists for this video, and its script and ledger grounded the outline, but the advisories above are the basis for the facts. No live patching was run for this companion, so hands-on steps are marked untested here.

What broke and why it scores 9.2

In the video: bug one, CVE-2026-109618, corrupts memory when PHP runs out of memory mid-request and trips over its own cleanup, and bug two, CVE-2026-109619, is stale-state use-after-free around session upload progress and INI-diagnostics consumers, with both ending in unauthenticated remote code execution plus possible memory disclosure of passwords, tokens, and keys.

Added from the sources: the PHP news archive confirms both identifiers, the GHSA IDs GHSA-w8hw-w9fx-j79w and GHSA-6wmf-4rv5-p3rp, and a CVSS 4.0 score of 9.2 for each, describing out-of-memory handling that leaves partially initialized request data behind and request-owned state that survives after its backing memory is freed. The PHP Foundation write-up adds that remote execution was demonstrated with default settings on Apache with mod_php and confirmed on PHP-FPM through application-level paths, which is why the video flags mod_php as the highest-risk setup. The CERT-EU advisory records the pre-announcement on October 20th and the release on October 21st at 13:30 UTC. WordPress, Drupal, and Joomla flows were demonstrated, per the video, so treat any internet-facing PHP app as exposed until patched.

Check whether you are exposed

In the video: check before you patch, because the host version tells you nothing about containers. On the host run php -v, then check the package source with dpkg or apt-cache policy. In Docker, exec into each container and run php -v there, and repeat per container and per LXC guest. Anything below 8.2.35, 8.3.36, 8.4.27, or 8.5.12, depending on branch, is vulnerable, and 8.1 and older get no upstream fix at all.

Exposure-check card listing the fixed builds 8.2.35, 8.3.36, 8.4.27, and 8.5.12, with host, container, and LXC checks and the 8.1 end-of-line warning
Exposure-check card listing the fixed builds 8.2.35, 8.3.36, 8.4.27, and 8.5.12, with host, container, and LXC checks and the 8.1 end-of-line warning (Still from the walkthrough video.)

Added from the sources: the PHP news archive confirms the four fixed releases and urges all users to update immediately, and independent reporting confirms no upstream fix for 8.1 and older. The inventory step is untested here, but it is read-only and safe: run it everywhere PHP could hide, including sidecar containers and LXC guests, before touching anything.

Patch from your vendor, then restart everything

In the video: patch from your vendor and verify, on Ubuntu and Debian with Ondrej's PPA targeting 8.2.35, 8.3.36, 8.4.27, or 8.5.12 by branch, while Ubuntu 20.04 gets nothing and must move on. On Fedora, RHEL, and Arch, update from the distro or Remi, with Remi shipping all four fixed builds on October 22nd in remi-modular, so confirm with a changelog check and not just the version string. Then restart every PHP worker, PHP-FPM, Apache mod_php, and any queue workers, or the old code stays resident.

Patch card naming Ondrej, Remi, and distro repos, the October 22 Remi modular build, changelog verification, and the restart-every-worker checklist
Patch card naming Ondrej, Remi, and distro repos, the October 22 Remi modular build, changelog verification, and the restart-every-worker checklist (Still from the walkthrough video.)

Added from the sources: the fixed version numbers match the video exactly, and the Remi timing, Ubuntu 20.04 exclusion, and changelog-check advice are the video's claims, carried here as stated. The restart step matters because patching files on disk does not replace code already loaded in long-running workers, so schedule the restarts as part of the same maintenance window. The vendor upgrade paths are untested here.

Containers, LXC guests, and appliances do not heal themselves

In the video: containers do not self-heal, so pull the rebuilt image and recreate the container, since a plain restart keeps the old PHP. Nextcloud AIO users go to 14.4.1 or later, Docker users pull the rebuilt nextcloud:35.0.2, and anyone building their own image rebuilds with --pull on an updated base. LXC guests get patched inside each guest, one by one. TrueNAS itself is not the vulnerable part, but hosted apps are, so update the apps. On Synology, open Package Center and apply SA-26:14, except PHP 7.3, which gets no fix. On QNAP, QSA-26:18 still has no fix as of October 23rd, so take the box off the internet, kill port forwards and UPnP, use a VPN, and wait for firmware.

Added from the sources: Synology SA-26:14 is confirmed as Critical and Resolved, with fixed PHP packages 7.4.33-0131, 8.0.30-0122, 8.1.34-0120, 8.2.35-0171, 8.3.36-0051, and 8.4.27-0051, plus Mail Station and Synology Calendar updates, and explicitly no fix for PHP 7.3. QNAP's QSA-26-18 is confirmed as published October 22nd with status Fixing and no finished updates, matching the video's take-the-box-offline advice. Image tags, rebuild flags, and appliance steps are the video's claims and are untested here. If you snapshot before patching, snapshot the app data too, since a rollback must restore both code and data together.

Verify, mind the end-of-life dates, and rotate secrets

In the video: run php -v again and confirm the fixed build, restart every worker, and back up before touching anything. On 8.1 or older, vendor backports are best-effort only, so check the changelog and upgrade to 8.3 or 8.4 if there is no backport, noting 8.2 goes end of life December 31st. A WordPress core update does not fix this because it is a runtime bug, and PhotoPrism, written in Go, is not affected. Partial mitigations are not fixes: WAF rules such as Akamai 3000199191 and Cloudflare, disabling upload progress, and memory-limit tweaks only narrow paths. A new October 23rd advisory, CVE-2026-115560, covers session-serializer handling in unusual configurations with no out-of-band release, mitigated by setting session.upload_progress.enabled to 0. If you were internet-facing and unpatched, rotate passwords, tokens, and keys.

Closing card reading verify then rotate, the final step after patching and restarting
Closing card reading verify then rotate, the final step after patching and restarting (Still from the walkthrough video.)

Added from the sources: the October 23rd follow-up advisory for CVE-2026-115560 is confirmed, sharing the same session.upload_progress.enabled=0 mitigation, with no further action needed if that setting is already applied. The PHP supported-versions page confirms 8.2 security support ends December 31st, 2026. The WAF rule number, the Akamai and Cloudflare framing, and the PhotoPrism callout are the video's claims, carried here as stated. Treat secret rotation as mandatory, not optional, for any box that served PHP to the internet while vulnerable, and keep this companion next to the site's reverse-proxy guide when you re-expose services.

Watch the walkthrough

Watch on YouTube