Patching the host does nothing for PHP inside a container. The image carries its own PHP, and a running container keeps the image it started from, even after a fixed one lands on Docker Hub.1 The fix is a new image, a recreated container and a check of the runtime that actually serves requests. The complete PHP2Shell guide covers both flaws; this page covers containers, FrankenPHP and platforms that build images for you.
You're potentially exposed until the exact running build and vendor patch status are verified if: any container, image or platform service runs PHP and was not rebuilt after the 21 October fixes. The fixed upstream releases are 8.5.12, 8.4.27, 8.3.36 and 8.2.35.2 An older-looking version string doesn't prove exposure on its own, because distribution packages can backport the fix, but an image you haven't rebuilt since 21 October is where to look first.3 CISA added both CVEs to its KEV catalog on 26 October, so exploitation is confirmed.4 Status as of 4 November 2026.
How you'd notice
You won't see it from the host. docker ps lists each running container and its image, and many apps bundle PHP without PHP in the name.1
docker compose exec <service> php -v is a first check, not proof. It reports the command-line binary, which can differ from the process answering web requests, and a vendor package can carry the fix under an older number.3 Verify two more things:
- The package release, if PHP came from packages. On Debian-based images run
docker exec <container> dpkg -l | grep php, on Alpinedocker exec <container> apk info -v | grep php, then match the result to your distribution's advisory.1 - The serving runtime. Check the PHP-FPM binary, the PHP module Apache loads, or FrankenPHP itself. Render's advisory says to confirm the PHP handling web requests, and to check PHP-FPM too.3
For FPM, php-fpm -v prints the version of the binary you ran. The name varies: Debian and Ubuntu packages ship it as php-fpm8.3 and similar. It doesn't prove which executable a running worker loaded, because a container can hold more than one PHP binary. To tie the check to the running process, find the master process's executable (for example with readlink /proc/<pid>/exe) and ask that binary for its version.
You want 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or a vendor build that documents the fix. A tag ending in RC1 is a release candidate that came before the release, not the fix.1
For a stopped container or an image you haven't started, docker inspect can show a PHP_VERSION environment variable on some images. Treat it as an inventory clue only. It depends on the image, may be absent, and can be stale. To see what an image really contains, start a throwaway container with the entrypoint overridden, for example docker run --rm --entrypoint php <image> -v, then run the package query inside it. For a server where PHP runs outside containers, how to check your PHP version safely has the steps.
Rebuild, redeploy, verify
Plain Docker and Compose
| What your Compose file uses | Do this |
|---|---|
A registry image with a floating tag, such as php:8.4-fpm or wordpress:latest | Run docker compose pull, then docker compose up -d, then recheck. If the version hasn't changed, the fixed image may not be published for that tag yet.1 |
A locally built service (build: in the Compose file) | Run docker compose build --pull, then docker compose up -d --force-recreate.5 pull fetches registry images and doesn't rebuild a local one. |
A pinned version tag, such as php:8.4.26-fpm | Edit it to a patched tag such as php:8.4.27-fpm, then pull or rebuild. A registry can republish or move a tag, so it may resolve to a different image later. Verify what runs.5 |
A digest pin (@sha256:…) | A digest reference stays fixed until the deployment configuration is updated to point at another image. Replace it with the digest of a patched image.5 |
| PHP installed with apt or apk in your Dockerfile | Install the fixed package named in your distribution's advisory, rebuild, then verify the package release.3 |
--pull asks Docker to look for newer versions of the base images in your FROM lines. It doesn't guarantee that every Dockerfile layer is rebuilt: a cached layer, such as an earlier apt or apk install, can be reused. It also can't produce a fixed package your distribution hasn't published. Add --no-cache when a layer installs PHP packages, then confirm the installed release.5
A pulled or rebuilt image that nothing restarted still runs the old PHP. Recreate every container, then verify each one as above.
FrankenPHP
Reported FrankenPHP 1.13.2, released 21 October, is a security release: its Docker images are built with PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12, and its static binaries with PHP 8.5.12.6 It also fixes four vulnerabilities in FrankenPHP itself.6 Pull a 1.13.2 or later tag, replace the containers, and verify the PHP inside. Treat an image built before 1.13.2 as unpatched until you've read the PHP version it carries.
Managed platforms
Reported Render's advisory, dated 22 October, says all PHP services on Render use Docker, so you update PHP inside your image, redeploy every affected service and confirm php --version in the service shell.3 It covers three cases: a base image (change the FROM line), distribution packages (install the fixed packages, noting backports may keep the old number) and a prebuilt registry image (obtain an updated image, push it, update the tag or digest).3 That is Render only. We checked no other platform's advisory, so read your platform's own before assuming it patches PHP for you.
Third-party images
An upstream image is only as patched as its maintainer's last rebuild, and an application image built on a PHP base inherits that PHP until its own maintainer rebuilds. Check each tag's push date and verify the PHP inside before you trust it, including the official WordPress, Drupal and Joomla images. Opinion If the Dockerfile is public and sits on a php base, rebuild it yourself on a patched base rather than wait. If you can't, limit who can reach that service and press the maintainer.
What a rebuild doesn't cover
CVE-2026-115560 is a separate flaw. PHP disclosed it on 23 October, the 21 October releases don't fix it, and the full advisory and fix come with the next regular release.2 PHP says it needs an unusual combination: an application sets session.serialize_handler to php_binary or php_serialize, switches it to php at runtime with ini_set() before session_start(), and session upload progress is still enabled. Applications that never change the handler at runtime can keep the feature on.2 PHP still suggests session.upload_progress.enabled=0 until the next bugfix release, to fully protect against it.2
So not every container carries the same exposure or the same cost. Search your code for runtime handler switches and for anything that reads upload progress, test upload-dependent features in staging, then set it in the image's php.ini or FPM pool config and recreate the container. PHP advises against relying on ini_set() or .user.ini.2
PHP 8.1 and older are the other gap. The project published no releases for them, only source backports for 7.4, 8.0 and 8.1.2 PHP 8.2 itself reaches end of life on 31 December 2026.2
Do this
Do today
- List every image and container that runs PHP, including application images built on a PHP base (WordPress, Drupal, Joomla, Laravel stacks and third-party images).
- Pull registry images, rebuild local ones with
--pull, edit any pinned tag or digest to a patched release, and recreate every container. - Verify inside each running container: the package release where PHP came from packages, the serving runtime (PHP-FPM, Apache module or FrankenPHP) and
php -v. Teammates running PHP on plain servers need the same fix on a plain Linux server. - Check your code for runtime
session.serialize_handlerswitches and upload-progress use, test in staging, then setsession.upload_progress.enabled=0in image configuration where it fits.
Do this week
- Add a scheduled rebuild or image-scanning step so a base-image fix doesn't depend on someone remembering.
- Move off PHP 8.1 and older images, and plan 8.2 images onto 8.3 or newer before 31 December.
- Record each third-party image's tag date and whether its maintainer has rebuilt.
Can wait
- Tune image size or switch between Debian and Alpine bases.
- Move to a different runtime.


Comments