FixVibe

Practical security guide

PHP2Shell security update: verify your web runtime

A practical PHP2Shell patch guide for developers of AI-built apps on PHP hosting, VPS images and containers. Match the web runtime to an upstream fix or vendor backport, then keep deployment evidence for each site.

DevelopingUpdated

By FixVibe editorialPublished Updated

# PHP2Shell security update: verify your web runtime

The short answer

PHP2Shell concerns two critical PHP flaws, CVE-2026-109618 and CVE-2026-109619. For upstream PHP, update within your branch to 8.2.35, 8.3.36, 8.4.27 or 8.5.12, or a later patched release. S1S2 If your AI-built app uses PHP hosting or a VPS image, confirm the runtime handling its web requests. For distribution packages, match the complete package revision to the vendor's advisory before deciding whether it is patched. S7

Am I affected?

Use this table for upstream PHP builds. The four advisory entries are branch-specific thresholds: they do not mean every version below 8.5.12 is vulnerable regardless of branch. S1S2

ProductAffected range within branchFirst fixed upstream versionConditionSource
PHP 8.28.2 releases before 8.2.358.2.35Unpatched upstream buildS1S2
PHP 8.38.3 releases before 8.3.368.3.36Unpatched upstream buildS1S2
PHP 8.48.4 releases before 8.4.278.4.27Unpatched upstream buildS1S2
PHP 8.58.5 releases before 8.5.128.5.12Unpatched upstream buildS1S2

PHP's warning covers web-serving installations using FPM, Apache mod_php, CGI, FrankenPHP and LiteSpeed. For older branches, obtain a vendor-supported fix or move to a supported release; the table above does not establish their safety. S3

Start with read-only evidence. In an existing authenticated site-health or hosting view, find the PHP version and identify which site it describes. PHP's phpversion() reports the executing parser's version; ask the host to supply that value from the web request path if the panel only shows an available version. S4

Record the interface too. PHP calls this the SAPI: examples include fpm-fcgi, apache2handler and cli. S5 A shell check is useful inventory:

php -v

Its output names the invoked binary's version and SAPI. Seeing cli establishes what you ran in the shell, not which process answered your site's request. S8 Do not publish a diagnostic page or expose configuration dumps to gather this evidence. If no protected view exists, request the information from your provider.

What happened

TimeEventConfidence
2026-10-17, time and timezone unspecifiedAmazon reports an exploitation attempt against its MadPot sensors, predating public disclosure.Reported by Amazon Threat Intelligence S9
2026-10-21 13:34:13 UTCPHP published GHSA-6wmf-4rv5-p3rp for CVE-2026-109619, concerning stale request state.Confirmed by vendor S2
2026-10-21 13:34:25 UTCPHP published GHSA-w8hw-w9fx-j79w for CVE-2026-109618, concerning out-of-memory corruption.Confirmed by vendor S1
2026-10-21, time unspecifiedPHP announced the security releases and urged immediate updates.Confirmed by vendor S3
2026-10-21, time unspecifiedUbuntu published USN-8948-1 with fixed distribution package revisions.Confirmed by vendor S7

The PHP advisories classify both issues as critical remote code execution vulnerabilities. S1S2 This guide concerns the interpreter beneath the application. Treat a generated application change and a hosting-runtime update as separate tasks: assign someone to prove the latter happened.

How to fix it

Managed or shared PHP hosting

  • Open a support request for the affected site, naming both CVEs. Ask for its serving PHP branch, complete vendor build or package revision, and the advisory establishing that build contains both fixes.
  • Ask the provider to apply its supported patched build and confirm when the site's web workers were replaced or restarted.
  • Revisit the site's protected runtime view after that confirmation. Keep the before-and-after evidence with the ticket.

Phrase the request around your domain and its assigned runtime. A general announcement that a host offers a new PHP version is weaker evidence than confirmation for the installation serving your app. That distinction follows from PHP's warning being about web-serving installations. S3

VPS images and distribution packages

  • Identify the operating-system release and package supplier before choosing an update.
  • Apply the vendor's security update for the PHP component serving requests, following that vendor's instructions. Ubuntu says a standard system update normally applies the necessary changes. S7
  • Have the server administrator verify that the relevant web service has restarted or replaced its workers, then obtain fresh web-runtime evidence. Include every separately configured site in the check.

A lower upstream number alone is insufficient to reject a vendor build. Ubuntu's October 21 notice lists 8.3.6-0ubuntu0.24.04.13 for PHP 8.3 packages on Ubuntu 24.04 LTS and 8.1.2-1ubuntu2.28 for PHP 8.1 packages on Ubuntu 22.04 LTS. Both package groups include FPM and Apache variants. S7

Match the release, supplier, package name and full revision together. Do not apply those Ubuntu revisions to a third-party repository or another distribution. If the vendor has not documented a fix for your build, record its status as awaiting vendor confirmation.

Containerized PHP applications

  • Identify the production image and the stage that supplies its PHP runtime. Record the currently deployed image digest.
  • Choose an updated base or application image whose maintainer documents the fix. Change an old pinned digest deliberately: Docker's digest pinning preserves the exact image and does not automatically take updates. S6
  • Rebuild and redeploy through your normal release process. Docker distinguishes fetching a fresh base with --pull from rebuilding cached layers with --no-cache; one does not substitute for the other. S6
  • Record the replacement image's digest and confirm the runtime through the running web application.

Do not treat “image pulled” as your completion criterion. Docker images are immutable snapshots; changing what is available in a registry does not rewrite an existing image. S6 For an app generated by an AI coding tool, require its deployment instructions to name the final image being released. Review that evidence yourself before closing the incident task.

If a patch cannot be applied today

Escalate to the hosting or image maintainer with both identifiers and an explicit update deadline. PHP states that its temporary measures only reduce particular attack paths; they do not make an installation safe, and an update is the complete solution. S3 Keep the item open until you have a supported patched build and deployment evidence. Avoid copying an unreviewed emergency script into production.

Verify the fix

Use the following worksheet as a completion rule for each site. It combines runtime identity, supplier evidence and deployment evidence; it is an operational recommendation, not an exploit test.

Evidence you holdWhat to recordDecision
Patched upstream build observed through the site's web runtimeDomain, SAPI, branch and version, observation time, restart or deployment recordClose the patch task when every serving instance is accounted for
Vendor package containing both fixes, linked to the site's runtimeVendor advisory, OS release, full package revision, worker replacement and fresh web observationClose with the vendor advisory attached
Only a CLI result, a new image tag, or a provider-wide announcementWhich link to the serving site is missing, owner and follow-up timeKeep verification open

The version function describes the parser executing the check, and SAPI describes its interface. Combining them avoids treating a CLI observation as a web observation. S4S5 For a vendor backport, add the package revision and advisory because an upstream-style number alone loses the relevant distinction. S7

After updating, check an ordinary page and a normal authenticated workflow for availability. These checks help catch deployment regressions; they do not establish that the server was never compromised. Do not send malicious requests or stress the application's memory as a patch check.

If you are investigating possible PHP2Shell exposure, Amazon recommends starting the review on October 17, 2026 or earlier. S9 Ask your provider to preserve available logs across that period and examine unexpected process activity or file changes. S9 Record any gaps in retention; missing logs should remain an uncertainty, not become a clean result. Keep the investigation separate from the patch-completion worksheet.

For this guide, we queried the upstream Git tag listing with a read-only command. That operation confirms access to published repository metadata only. We did not test either vulnerability, inspect your hosting account, or verify a deployed PHP process.

What we know and what we don't

Vulnerability: PHP confirms the two critical flaws and the fixed upstream releases. S1S2 Exposure: the vendor warning includes PHP web runtimes; determine your installation's build and request path before drawing a site-specific conclusion. S3

Exploitation: Amazon reports an October 17, 2026 attempt against its MadPot sensors and further attempts before disclosure. It cautions that whether those early attempts would have succeeded on real systems is unclear, while also reporting wider exploitation after release. S9

Compromise: sensor activity does not establish that your particular server was compromised. This guide makes no claim about exploitation rates or compromise of a particular host. Patching addresses the known defects; investigating suspicious activity is a separate task. Preserve relevant logs and involve your hosting provider or incident responder if you have evidence of intrusion.

Questions developers are asking

Is a patched CLI version enough?

No. The command-line version option reports the binary you invoked and includes its SAPI. S8 Obtain evidence from the site's serving runtime too. Treat the shell result as one inventory item, then connect the web observation to the updated package or image before marking that site complete.

Can an older-looking PHP version already contain the fix?

Yes, when the vendor documents the matching package revision. Ubuntu's notice demonstrates this with fixed packages that retain older upstream version numbers. S7 Require a match for your OS release and supplier; an unrelated vendor's backport or a recent build date is not sufficient evidence.

Does pulling a new Docker image finish the update?

No. Docker documents images as immutable, and digest pinning intentionally preserves an exact image. S6 Finish your deployment process, identify the replacement container image, and check the PHP runtime serving the application. Keep the task open if you only know that the new image exists locally.

What should I ask a shared host that has not confirmed patching?

Ask for the runtime and vendor revision assigned to your site, the advisory covering both CVEs, and the time its workers were replaced. Request a concrete update plan if those facts are unavailable. PHP directs users of vendor packages to their suppliers for patched builds. S3

Updates

  • 2026-10-22 05:55 UTC — First publication of the PHP runtime verification guide.
  • 2026-10-22 09:38 UTC — Added Amazon's report of pre-disclosure activity and its October 17 investigation lookback; retained the distinction between attempts and confirmed compromise. S9
  • 2026-10-22 11:41 UTC — Added repository image-pin scanning guidance, its prerequisites and limits.

How FixVibe can help

FixVibe can flag an outdated PHP image pin in a repository Dockerfile: it checks exact version tags for official PHP-FPM or Apache images in single-stage builds against the fixed release for that branch. The branch-specific fixes remain 8.2.35, 8.3.36, 8.4.27 and 8.5.12. S1S2 The finding identifies the Dockerfile, image, recorded PHP version and first fixed release.

This check covers repository image pins only. Distribution packages and backports, floating tags, multi-stage builds, non-official images and CLI images are outside its scope. It does not use Composer platform constraints or HTTP response banners as evidence. It is not a live probe: a repository finding does not establish what was built or deployed, whether the running service is still unpatched, or whether it is exploitable. Continue the web-runtime and backport verification above even when a repository scan reports no issue.

Connect your repository and run a repository scan. You need a connected GitHub repository and a Pro or Unlimited plan; Free and Hobby do not include repository scans. After changing the image pin, rebuild and redeploy, then verify the PHP runtime serving the site. For more background, see our PHP2Shell research article. S10

Keep the patch task open until you have verified the runtime actually serving your site.

Check the relevant surface of your app

Connect your repository →

Requires a GitHub connection and an eligible paid plan. A URL scan does not inspect repository dependencies.

Ready to check your own app?

Scan your deployed app

Sources

  1. [S1]PHP advisory: CVE-2026-109618Accessed
  2. [S2]PHP advisory: CVE-2026-109619Accessed
  3. [S3]PHP October 21 security announcementAccessed
  4. [S4]PHP manual: current parser versionAccessed
  5. [S5]PHP manual: server interface identityAccessed
  6. [S6]Docker build practices: fresh bases and pinned imagesAccessed
  7. [S7]Ubuntu USN-8948-1: fixed PHP package revisionsAccessed
  8. [S8]PHP manual: command-line version optionAccessed
  9. [S9]Amazon Threat Intelligence: PHP2Shell activity before disclosureAccessed
  10. [S10]FixVibe research: PHP2Shell PHP runtime vulnerabilitiesAccessed