TV TopVPSList

PHP maintenance and security

PHP2Shell: Am I Affected, and How Do I Patch It?

Check PHP2Shell fixed releases, patch Ubuntu, Debian, cPanel or Docker, restart PHP workers and verify your website runtime against vendor advisories.

Last updated: · Sources reviewed: 2026-10-23

What is PHP2Shell?

CVE-2026-109618 and CVE-2026-109619 are PHP runtime vulnerabilities that can permit remote code execution without authentication. PHP's announcement covers web-serving installations, including FPM and Apache; patch the runtime rather than relying on a WordPress plugin update.

Am I affected?

BranchAffected upstream releasesFixed releaseBranch status
8.5Below 8.5.128.5.12 or newerActive
8.4Below 8.4.278.4.27 or newerActive
8.3Below 8.3.368.3.36 or newerSecurity only
8.2Below 8.2.358.2.35 or newerEOL in 69 days
Older branchesCheck vendor advisoryNo upstream release; source backports and vendor fixes may existEnd of life

Distribution packages keep their own numbers: Ubuntu's patched PHP 8.3 package is 8.3.6-0ubuntu0.24.04.13. Compare the full package build with USN-8948-1, rather than treating an older-looking number as proof of exposure.

First, find your PHP version

php -v

Also check the web runtime: CLI and FPM can differ. Follow the PHP version checks for WordPress, panels and containers.

Patch steps by environment

Ubuntu and Debian

Back up and arrange a maintenance window. Review the packages offered by your configured repositories, install updates, then restart the actual FPM services or Apache handler used by every site. Replace service placeholders with installed service names.

sudo apt update && sudo apt upgrade
# Identify installed PHP services before restarting them:
systemctl list-units --type=service 'php*'
# Example pattern only: sudo systemctl restart <your-php-fpm-service>
DistributionFixed packageSource
Ubuntu 24.04 LTS8.3.6-0ubuntu0.24.04.13Ubuntu notice
Ubuntu 22.04 LTS8.1.2-1ubuntu2.28Ubuntu notice
Ubuntu 26.04 LTS8.5.4-0ubuntu1.5Ubuntu notice
Debian trixie8.4.27-1~deb13u1Debian tracker
Debian bookworm8.2.35-1~deb12u1Debian tracker

cPanel / WHM

Refresh repository metadata using the OS-specific instructions in cPanel's advisory, then run the package updater as administrator. Check every domain in MultiPHP Manager, including domains pinned to a non-default branch.

/scripts/update-packages
# RPM systems; replace ea-php84 with each installed branch:
rpm -q --changelog ea-php84-php-cli | grep -m1 CVE-2026-109618
# On Ubuntu, use the changelog path in the cPanel advisory instead.

Docker and WordPress containers

For a custom PHP image, select a fixed full-version tag such as php:8.4.27-fpm-alpine, rebuild with docker build --pull, and recreate all affected web, queue and cron containers. Check the published tag and supported architecture before selecting it.

For a WordPress Compose service, pull and recreate it, then verify the running container. Pulling an image alone does not start a new container.

docker compose pull wordpress && docker compose up -d wordpress
docker compose exec wordpress php -v

Plesk, RHEL, AlmaLinux, Rocky and other vendors

Use your vendor's current security advisory for the installed PHP package and repository. The upstream table does not certify vendor builds or third-party repositories. Ask support for a package build covering both CVEs; avoid switching repositories simply to match a version string.

Shared hosting and managed WordPress

Ask your host to confirm the patched build serving each domain and restart coverage. If a branch change is needed, follow the WordPress PHP upgrade checklist before switching.

After patching: restart and verify

  1. Restart all affected workers, including background containers.
  2. Check CLI and the web runtime independently, and confirm vendor backports from the full package build.
  3. Test login, forms, uploads and scheduled jobs.

Amazon's October 21 report recommends reviewing logs and unexpected process execution or file changes, investigating from at least 2026-10-17. Suspected compromise needs incident response; installing a patch alone does not remove an intrusion.

If you cannot patch today

These measures reduce exposure to known attack paths; they do not make PHP safe. Have the server administrator apply and review them using the complete PHP advisory.

  • Set session.upload_progress.enabled=0 before request parsing and restart all workers. Application ini_set() and FPM .user.ini are insufficient.
  • For the newest supported branch, review the advisory's fatal_error_backtraces setting.
  • Read the official advisory before changing memory limits. PHP suggests memory_limit=-1 with external container/cgroup boundaries; this is not a generic resource tuning recommendation. Do not substitute RLIMIT_AS or RLIMIT_DATA.
  • Review request-size limits and upload requirements with your administrator. Hiding errors does not fix the vulnerability.

Amazon also discusses temporarily restricting multipart uploads after checking the effect on the application. Follow Cloudflare's coverage notice if using that WAF, and continue the patch process.

Disclosure and response timeline

Times shown with hours are UTC. Reports describe observations at their publication time, not proof that every attempt succeeded.

DateReport
2026-10-17Amazon reports the first exploitation attempt recorded by its MadPot sensors. Source
2026-10-20PHP announces an upcoming critical security release. Source
2026-10-21Cloudflare announces free WAF rules and paid-plan coverage; paid customers should confirm their Managed Ruleset uses block mode. Source
2026-10-21 14:00 UTCPHP publishes the security updates. Amazon's October 21 report describes exploitation in the wild. Source

FAQ

How do I fix the PHP vulnerability?+

Install PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35, or a newer release on the same branch, or your vendor’s equivalent patched package. Restart every worker and verify the web runtime as well as the command line. A WAF is an additional layer, not a replacement for installing the update.

Is PHP 8.1 affected and will it get a fix?+

PHP no longer publishes upstream releases for this branch. Minimal source backports were supplied for builders, and distribution or LTS vendors may supply patched packages. Verify both CVEs with the vendor and plan a move to a supported branch; the existence of a backport does not restore upstream support.

Does Cloudflare protect me?+

Read Cloudflare’s protection announcement for current coverage and rule availability. WAF coverage does not establish that the origin runtime is patched. Install the PHP update and verify the build serving every website, even when traffic normally passes through a WAF.

Do I need to patch if my site does not use file uploads?+

Yes. Amazon describes restricting multipart uploads as a temporary exposure reduction for deployments that cannot immediately update, with an application impact check first. This is not complete remediation. Install the runtime update, restart workers and verify the actual server build.

Change log

: Initial guide; reviewed upstream fixes, distribution packages, cPanel instructions and runtime verification.

Related PHP guides

Sources

This page is general guidance, not a security audit. Version numbers and vendor package names change; confirm against your vendor's advisory before you rely on them. “Not found” or “patched” here does not mean your site is safe. We do not publish exploit code or lists of affected websites.