↓ Skip to main content

PHP2Shell CVE-2026-109618 and CVE-2026-109619: Ubuntu Patches and Fixes

PHP2Shell CVE-2026-109618 and CVE-2026-109619: Ubuntu Patches and Fixes

Two critical PHP vulnerabilities, CVE-2026-109618 and CVE-2026-109619, collectively known as PHP2Shell, have prompted security updates across multiple Ubuntu releases. Both vulnerabilities carry a reported CVSS 4.0 score of 9.2 and potentially allow unauthenticated remote code execution (RCE).

For administrators running PHP websites, hosting control panels, or self-hosted services on Ubuntu, the immediate priorities are to identify affected packages, install the appropriate security updates, and restart every process that may still be running the vulnerable PHP code.

The reported scope spans Ubuntu 14.04 through 26.10, although the availability of fixes depends on the distribution’s support status and, for older releases, Ubuntu Pro’s Extended Security Maintenance (ESM) channel.

Important: Treat the CVE details, package versions, and exploitation reports below as claims from the supplied incident report. Verify them against Canonical’s official security notices and Ubuntu package records before applying changes to production systems.

🚨 Why These Vulnerabilities Require Immediate Attention
#

Both PHP2Shell vulnerabilities reportedly affect the PHP interpreter itself, rather than a particular framework or application plugin. This distinction is important because upgrading Laravel, Symfony, WordPress, or another application framework does not replace the vulnerable interpreter.

According to the incident report, the affected interfaces include PHP-FPM, Apache’s mod_php, php-cgi, FrankenPHP, and LiteSpeed integrations.

What CVSS 9.2 Means in Practice
#

A CVSS 4.0 score of 9.2 falls within the critical severity range. The reported attack characteristics include:

  • Network accessibility: An attacker can initiate an attack remotely.
  • No authentication required: The attack does not require a valid application account.
  • No user interaction: The victim does not need to click a link or approve an action.
  • Potential remote code execution: Successful exploitation may allow an attacker to execute code with the privileges of the affected service.

If the PHP process runs as www-data, successful exploitation could expose application configuration files, database credentials, writable web directories, and other resources accessible to that account.

The actual impact depends on the deployment’s permissions, isolation boundaries, and configuration. Compromising a web-service account does not automatically grant root privileges, but it can provide a foothold for further attacks.

Reported Exploitation Activity
#

The supplied report attributes early exploitation observations to AWS Threat Intelligence honeypots, with activity reportedly detected on October 17, 2026, before public disclosure. It also describes public proof-of-concept releases and subsequent exploitation attempts.

These claims should be checked against the original security advisories before being treated as independently verified facts.

The practical lesson remains straightforward: when a remotely exploitable vulnerability affects an exposed service, administrators should not wait for a public exploit to become reliable before applying an available security fix.

For related coverage of Ubuntu security updates and vulnerability response, see Ubuntu Moves to Weekly Kernel Releases as AI Accelerates CVEs on PUDN.

🛠️ How to Check and Patch PHP on Ubuntu
#

The following workflow helps identify PHP packages, install available security updates, and restart affected services.

Run the commands with appropriate administrative privileges. On production systems, follow your normal change-management and rollback procedures.

Step 1: Identify Installed PHP Packages
#

Start by listing installed PHP-related packages:

dpkg-query -W -f='${binary:Package}\t${Version}\n' 'php*' 2>/dev/null

This is more comprehensive than checking only version-numbered metapackages because it can also identify components such as PHP-FPM, CLI, and individual extensions.

To check the PHP command-line version, run:

php -v

Keep in mind that the CLI version may not identify every PHP runtime used by the server. Multiple PHP versions can coexist, and a web server may use PHP-FPM even when the command-line default points to another version.

Also inspect the services running on the system:

systemctl list-units --type=service --all | grep -E 'php.*fpm|apache2|nginx|frankenphp|lsws'

The output provides useful clues, but it is not an exhaustive inventory of every possible PHP deployment. Containers, manually installed runtimes, and externally managed services may require separate checks.

Step 2: Install Available Security Updates
#

Refresh the package indexes and install available upgrades:

sudo apt update
sudo apt upgrade

On a production server, review the proposed changes before confirming the upgrade, particularly if unrelated packages are also scheduled for updates.

If you intend to update only PHP-related packages, first identify the exact installed packages and their repository candidates:

apt list --upgradable 2>/dev/null | grep -E '^php[0-9.]*(/|-)'

Then upgrade the appropriate packages explicitly. For example:

sudo apt install --only-upgrade php8.3-cli php8.3-fpm

Replace the package names with those actually installed on your system. This example does not cover every PHP package or deployment, and upgrading only two packages may leave other vulnerable PHP components untouched.

Important: Do not assume that a package is patched merely because its version looks older or newer than an upstream PHP release. Ubuntu frequently backports security fixes while retaining the distribution’s existing version scheme. Verify the installed package against the relevant Ubuntu security advisory.

Step 3: Verify the Fixed Package Versions
#

The supplied report lists the following Ubuntu package versions as containing fixes. Verify these values against Canonical’s security tracker before using them as definitive remediation targets.

Ubuntu Release PHP Package Reported Fixed Version
14.04 Trusty php5 5.5.9+dfsg-1ubuntu4.29+esm18
16.04 Xenial php7.0 7.0.33-0ubuntu0.16.04.16+esm22
18.04 Bionic php7.2 7.2.24-0ubuntu0.18.04.17+esm14
20.04 Focal php7.4 7.4.3-4ubuntu2.29+esm5
22.04 Jammy php8.1 8.1.2-1ubuntu2.28
24.04 Noble php8.3 8.3.6-0ubuntu0.24.04.13
26.04 Resolute php8.5 8.5.4-0ubuntu1.5
26.10 Stonking php8.5 8.5.9-0ubuntu2.1

Package versions are distribution-specific, and the table should not be interpreted as an exhaustive list of every affected PHP binary or extension.

The +esm suffix indicates that the package version belongs to Ubuntu’s Extended Security Maintenance channel. Older Ubuntu releases may require an active Ubuntu Pro entitlement to access the applicable security updates.

Step 4: Restart PHP and Web Server Processes
#

Installing a fixed package does not necessarily terminate processes that already have the old PHP code loaded into memory.

This is one of the most important parts of the remediation procedure.

Identify the relevant services and restart the actual PHP runtime used by your applications.

For PHP-FPM, an example command is:

sudo systemctl restart php8.3-fpm

Use the service name corresponding to your installed PHP version.

For Apache deployments using mod_php, restart Apache:

sudo systemctl restart apache2

If Apache or Nginx forwards requests to PHP-FPM, restart the relevant FPM service as well. Restarting the web server alone may not replace the code loaded by a separate FPM process.

For FrankenPHP, LiteSpeed, containers, or manually managed PHP workers, follow the restart or redeployment procedure appropriate to that runtime.

A full system reboot is another option when operationally appropriate:

sudo reboot

A reboot can help ensure that old processes are terminated, but it should be scheduled with consideration for availability, service dependencies, and production workloads.

Step 5: Confirm That Remediation Is Complete
#

After the upgrade and restart, check the installed package versions again:

dpkg-query -W -f='${binary:Package}\t${Version}\n' 'php*' 2>/dev/null

Check the relevant services:

systemctl --no-pager --full status php8.3-fpm

Replace php8.3-fpm with the actual service name.

Finally, verify the PHP runtime used by the application rather than relying exclusively on php -v. Depending on the deployment, this may require checking the FPM pool, container image, application health checks, or server logs.

Do not expose a public phpinfo() page solely to verify a patch. If such a page already exists, ensure it is appropriately protected or removed after testing.

🔐 Ubuntu 20.04 and Earlier: Understanding Ubuntu Pro and ESM
#

The older Ubuntu releases in the supplied table require special attention because their PHP security fixes may be distributed through Ubuntu Pro’s Extended Security Maintenance channel.

The +esm suffix is therefore significant: a standard package upgrade cannot install an update that is unavailable to the system’s configured repositories.

Administrators can inspect their Ubuntu Pro status with:

sudo pro status

If the required ESM service is unavailable, review the machine’s Ubuntu Pro entitlement and repository configuration.

Ubuntu Pro has offered a free personal subscription for a limited number of machines, subject to its applicable terms. Eligible community contributors may have access to a larger allowance. Administrators should check Canonical’s current subscription terms rather than assuming that a particular entitlement applies to every organization or deployment.

For fleets of Ubuntu systems, centralized management can help stage security updates, validate them on test machines, and roll them out to production in controlled batches.

However, installing one security fix does not resolve the broader maintenance risks of operating an obsolete distribution. Ubuntu 14.04 and 16.04 have accumulated substantial differences from currently supported releases. Where feasible, plan a migration to a supported Ubuntu version instead of treating individual backported patches as a substitute for lifecycle management.

⚙️ Why Automatic Updates Are Not Enough
#

Ubuntu systems may use unattended-upgrades to install security updates automatically. That reduces the time between package publication and installation, but it does not guarantee that every running process immediately begins using the patched code.

A typical remediation sequence is:

  1. The package manager downloads and installs the updated PHP package.
  2. Existing PHP workers continue running until they are restarted or terminated.
  3. The service manager or deployment system replaces those processes.
  4. Verification confirms that the expected packages and runtime are active.

This distinction matters for PHP-FPM pools, long-running workers, containerized applications, and services that maintain persistent processes.

A successful package upgrade is an important milestone, but it is not sufficient evidence that the entire application stack is running patched code.

📋 Final Assessment
#

PHP2Shell illustrates why critical interpreter vulnerabilities deserve prompt attention. When the underlying PHP runtime is affected, application-level security controls and framework upgrades cannot replace the need to patch the interpreter itself.

For Ubuntu administrators, the most important actions are to:

  • Inventory all installed and actively used PHP runtimes.
  • Verify the vulnerability and fixed package versions against Canonical’s official advisories.
  • Install the applicable security updates, including ESM updates where required.
  • Restart every affected PHP runtime and worker process.
  • Confirm the installed package versions and active application runtime.
  • Plan migrations for unsupported or aging Ubuntu deployments.

The most useful command to retain in an operational checklist is:

dpkg-query -W -f='${binary:Package}\t${Version}\n' 'php*' 2>/dev/null

Unlike a check limited to a single PHP metapackage, it helps expose a wider range of installed PHP components. It should still be combined with service, container, and deployment-level checks to build a complete inventory.

The central lesson is simple: patching is complete only when the fixed code is installed and the affected services are actually running it.

Related