Start with the PHP advisories

Canonical uses the PHP2Shell nickname for CVE-2026-109618 and CVE-2026-109619. A CVE is a public identifier for a reported security flaw. Use those identifiers when asking a supplier about a fix, since a product notice may omit the nickname. Canonical's PHP2Shell announcement connects the name to both CVEs.

PHP's first advisory describes a failure during memory exhaustion that can leave request data in an invalid state. Its second describes request data that a worker can still refer to after PHP has freed that data. Both can lead to remote code execution, meaning an attacker may make the server run code. Read the primary advisories for CVE-2026-109618 and CVE-2026-109619.

The PHP project released the following fixes on October 21, 2026. Its notice covers PHP installations serving web requests, including PHP-FPM, Apache's mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP's security announcement is the source for this upstream release table.

First fixed upstream releases for both CVEs
PHP branchFirst fixed release
8.28.2.35
8.38.3.36
8.48.4.27
8.58.5.12

Upstream means PHP as released by the PHP project. Linux distributors and other suppliers can adapt security fixes to their own older packages. Identify who built your package before applying this table to its version.

Find the PHP that handles web requests

A runtime is a working installation of PHP that executes application code. Begin with a list of sites and the service that serves each one. Include control panels, private administration sites and products that bundle PHP. NCSC-NL's PHP2Shell guidance specifically includes appliances and other products with embedded PHP.

For each site, record its hostname, hosting account or server, PHP service or container, package supplier and responsible person. If several servers answer requests for one hostname, include each server.

On a Unix-like server where you already have authorized shell access, these commands identify the PHP command selected by your shell and ask it for its version and configuration file locations. They do not change PHP settings:

command -v php
php -v
php --ini

php -v reports the version and interface of that executable. php --ini lists configuration files for that command-line invocation. PHP documents both options in its command-line manual. Keep this output labeled with the server, time and command used.

The command line is one interface to PHP. A website may use PHP-FPM, which manages workers that handle requests, or an Apache module loaded into the web server. PHP calls these interfaces SAPIs. Values such as cli, fpm-fcgi and apache2handler identify different interfaces, as the PHP SAPI reference explains.

Use an existing protected administration view, hosting control panel or an administrator's approved runtime report to obtain the web PHP version and interface. Then ask the administrator to connect that report to the relevant service and installed package. A report from one request identifies the worker that answered it; other services or backend servers still need checking.

Avoid publishing a full PHP diagnostic page as a shortcut. PHP's phpinfo() reference shows that its output can include environment data, paths, configuration and request variables. Ask for only the fields needed, through an access-controlled channel.

Compare the complete package version

A backport is a fix adapted to an older software release. Ubuntu's notice lists 8.3.6-0ubuntu0.24.04.13 as a fixed PHP package revision for Ubuntu 24.04 LTS. That is a documented vendor fix even though its leading version, 8.3.6, looks older than upstream PHP 8.3.36. The example applies to the Ubuntu packages and release named in USN-8948-1.

On a Debian or Ubuntu system using dpkg, this read-only query lists matching package records, their full versions and installation status. It normally does not need administrator privileges:

dpkg-query -W -f='${binary:Package}	${Version}	${db:Status-Status}\n' 'php*-fpm' 'libapache2-mod-php*' 'php*-cgi' 'php*-cli'

Read the status column as well as the version. A record can remain for a package that is no longer installed. These patterns cover common web and command-line PHP package names, not custom builds, every extension or every bundled copy. The Debian dpkg-query manual documents the query and its status fields.

Compare installed web-runtime packages with the notice for that exact operating-system release and supplier. On another platform, use its vendor's package records and advisory instead. A package downloaded into a cache, an available update or a fixed package for a different release cannot answer what your site currently runs.

Connect the fixed files to running workers

Package records describe installed files. Confirmation must also cover processes using those files. Canonical says applications using the updated interpreter may need restarting; it specifically requires an Apache restart for mod_php and warns that automatic updates can leave this step outstanding. See its PHP2Shell update guidance.

On a Linux server using systemd and the Ubuntu-style service name php8.3-fpm.service, an authorized operator can inspect service state with:

systemctl show php8.3-fpm.service --property=ActiveState --property=MainPID --property=ExecStart --property=ExecMainStartTimestamp

Replace the unit name with the actual service serving the site. This command reads properties; it does not restart anything. If access is denied, have the responsible administrator collect the details rather than changing account permissions.

MainPID identifies the main process known to systemd. ExecStart describes its configured start command, and ExecMainStartTimestamp records the main process start time. These fields help connect a service to a binary path and maintenance record. They do not by themselves establish which code every worker has loaded. The official systemctl manual and systemd service-property reference describe these limits and fields.

Ask the administrator to confirm that the service uses the fixed package or build, that affected old workers have exited and that new workers handle requests. For mod_php, that includes the PHP module loaded into Apache. For containers, connect each running container to its intended fixed image and confirm the deployed application runtime. Treat missing access or an unidentified process as an open item in the report.

Next, use existing health checks and ordinary read-only application pages to check availability and errors. Agree any login, upload or purchase tests with the site owner, using approved test accounts and data. Record the routes checked, when they ran and whether the requests reached PHP rather than only a cached page.

A useful verification record
RecordQuestion it answers
Supplier notice and full installed versionDoes the supplier identify this package or build as fixed for both CVEs?
Service, worker and deployment evidenceAre the PHP processes serving this application using that fixed build?
Application checks and error reviewDid the agreed parts of the site work after the change?
Unchecked systems and failed checksWhere does the conclusion still have limits?

15 questions about checking and fixing PHP2Shell

1. What should I do when a scanner reports PHP2Shell?

Save the alert, affected hostname, detection time and evidence it used. Ask whether it matched an advertised version, inspected an installed package or tested behavior. Then map its finding to the two CVEs and your actual PHP supplier. Start the technical comparison with the PHP advisory for CVE-2026-109618 and its companion advisory.

2. Is PHP-FPM affected, or only Apache mod_php?

PHP includes FPM in its risk guidance. The out-of-memory advisory explains that FPM handles failure during request startup differently from mod_php, while other failures after startup can still reach affected cleanup behavior. At publication, that advisory described FPM as susceptible without reporting a complete FPM exploit for that issue. Do not apply the demonstrated mod_php attack's exact conditions to every interface or exempt FPM from patching. See PHP's susceptibility analysis.

3. Will updating WordPress, Drupal or a PHP plugin fix this?

Check what the update actually contains. These advisories concern the PHP interpreter, so an application-only update leaves the runtime question unresolved. If a product bundles PHP, its supplier may deliver the runtime fix in a product update. Ask for the product notice, fixed build and instructions that apply to your installation. NCSC-NL's operational guidance includes software that embeds or depends on PHP, beyond ordinary websites.

4. Why does php -v disagree with my hosting panel?

The commands may refer to different PHP installations or interfaces. Your shell can select a command-line executable while a hosting account uses a separately selected web runtime. PHP's command-line introduction explains that binary names and locations depend on installation. Record both outputs, then have the host identify the executable or module serving the specific website.

5. Which php.ini file matters for my website?

Use the configuration loaded by its web runtime. PHP can select different files by interface and can scan additional configuration directories. A command-line --ini report belongs to that invocation. Ask for the loaded web configuration path and any relevant pool or server overrides through a protected administrative report. PHP's configuration-file documentation explains the search order and when files are read.

6. Can PHP 8.3.6 already contain the PHP2Shell fix?

Yes, when the supplier documents a fixed package based on that version. Ubuntu 24.04's 8.3.6-0ubuntu0.24.04.13 is one specific example in USN-8948-1. A bare 8.3.6 does not identify that package revision or its source. Preserve the full version, operating-system release, package name and supplier notice together, then confirm that the site's PHP workers use the installed fix.

7. What evidence should I request from a shared hosting provider?

Ask it to confirm both CVEs for your hosting account, identify the fixed package or internal build, link its advisory or package source, and state when affected web workers were replaced or restarted. Include each site's selected PHP branch if accounts can use different versions. Where a provider uses a private build, ask for its written mapping between that build and both fixes.

8. Does a successful package update mean the fix is running?

Package records identify the installed build. Canonical's update guidance says applications can still require a restart after updates, including those installed automatically. Have the operator check affected services and workers, then obtain a web-runtime report and application checks. Keep the installation time and service transition evidence together so another administrator can review how the conclusion was reached.

9. Must I check every PHP-FPM pool and website?

Map every site to its pool and PHP service, then check each distinct runtime. Several pools can share a fixed service, while another service on the same machine runs a different PHP branch. Pool configuration can also supply settings that differ between sites. PHP's FPM configuration reference documents global and pool settings. Use shared evidence where it actually covers several sites, and retain individual application checks where their behavior differs.

10. How should I verify PHP inside a container?

Record the running container's image identity, the fixed PHP build in that image and the deployment that created the current container. Docker documents how inspection returns container information and how digests identify image content. An image name alone leaves important details unresolved. Use existing authorized operator access; the Docker security guidance warns that Docker group membership grants root-level privileges. This workflow does not require giving a site owner Docker access.

11. Will a web application firewall make an unpatched server safe?

PHP says its temporary measures reduce particular attack paths and that updating is the complete solution. A firewall rule needs its own supplier guidance, scope and validation. Record which requests it covers and whether any route reaches the origin server without it. Treat it as an interim control while arranging the fixed runtime. The PHP security announcement describes the limits of temporary measures.

12. Should I copy temporary PHP settings from an online guide?

Have the responsible administrator review the official guidance against the application's settings and resource limits first. For example, PHP's advisory discusses removing its own memory limit alongside other limits and an external availability boundary. That changes failure behavior and needs operational review. Use PHP's current out-of-memory advisory when planning an approved interim change.

13. What if my site still needs PHP 7 or PHP 8.1?

Identify the vendor maintaining that build and check for a documented backport covering both CVEs. Upstream PHP support has ended for those branches. Ubuntu lists a standard-support fix for its PHP 8.1 package on Ubuntu 22.04 in USN-8948-1. Its fixes for older Ubuntu releases in USN-8948-2 use specific Ubuntu Pro coverage. Availability depends on the release, package and maintenance entitlement. Alongside any supported vendor fix, plan application compatibility work toward a branch covered by PHP's current support schedule.

14. How can I tell whether someone attacked the server before patching?

Open a separate investigation with the person responsible for security. Define the period when an affected runtime was reachable and preserve relevant web, PHP, host and deployment records before retention policies remove them. Ask the investigator to assess unexpected files, account changes, process activity and available logs in context. Package checks and ordinary page loads leave earlier compromise unresolved.

15. Can I verify remediation without running an exploit?

Use the documented fixed build, a complete runtime inventory, evidence that affected workers were replaced, and agreed application checks. Record limits such as an inaccessible backend or a vendor build still awaiting confirmation. If your organization requires further security validation, have its security lead define the authorized scope and method separately. Keep the resulting conclusion tied to the CVEs, systems and checks actually covered.

Choose help that matches what you still need to know

PHPFixes offers a free version-text checker now. Paid services are in preparation: payment, delivery and scheduling are closed. The following describes planned scopes, so an inquiry starts a discussion about your setup.

OptionUseful purpose
Free version checkCompare version text you enter with upstream PHP2Shell fixes. It does not connect to the server or confirm which package and workers your website uses.
Planned Server ScanInspect an agreed server's PHP installations, package information, running services and signs needing further investigation.
Planned StopgapApply agreed temporary protections when a permanent fix cannot yet be installed, with a plan for permanent remediation.
Planned PatchInstall an appropriate fixed build on an accepted setup, restart affected services and perform agreed checks.
Planned UpgradeMove an application to a supported PHP branch, including compatibility work agreed for that site.
Planned CareProvide continuing PHP security maintenance within an agreed service scope.

Check your PHP version text free, or inquire about a planned service. If a host manages PHP for you, begin by asking it for the package and running-service confirmation described above.

Primary sources used in this guide