Vulnerability · PHP · updated

PHP2Shell (CVE-2026-109618, CVE-2026-109619): code execution in PHP without a login

Two bugs in PHP let anyone on the internet run their own code on a server that runs PHP websites, without logging in. Attackers have been doing this since October.

FixReleased
ExploitationConfirmed in the wild
Public exploit codeYes
CISA KEVListed 26 Oct 2026
Severity9.2 (CVSS 4.0, PHP project)

Quick answers

What is PHP2Shell?

PHP2Shell (CVE-2026-109618, CVE-2026-109619) is the name for two vulnerabilities in PHP. Two bugs in PHP let anyone on the internet run their own code on a server that runs PHP websites, without logging in. Attackers have been doing this since October.

Am I affected by PHP2Shell?

If any of your sites or apps run on PHP (WordPress, Magento, Laravel, Drupal, most shared hosting and control panels), assume yes until your team has checked. Servers that only run PHP from the command line are not affected.

Which versions fix PHP2Shell?

PHP 8.5: 8.5.12; PHP 8.4: 8.4.27; PHP 8.3: 8.3.36; PHP 8.2: 8.2.35; PHP 8.1 and older: No release. The PHP team published source patches for 7.4, 8.0 and 8.1 only.

Is PHP2Shell being exploited?

Yes, exploitation in the wild is confirmed; CISA added it to the Known Exploited Vulnerabilities catalog on 26 Oct 2026. Public exploit code exists.

Is there a workaround for PHP2Shell?

Updating is the only complete fix; the PHP project says none of these settings is a full mitigation. They reduce exposure until you can update. For CVE-2026-109618: set memory_limit to -1 with php_admin_value and keep post_max_size low (8M, or 32M if you need uploads). For CVE-2026-109619: set session.upload_progress.enabled to 0, and on PHP 8.5 also fatal_error_backtraces to 0. Restart all PHP workers after the change.

What this means for your business

Whoever gets in runs code as the web server. From there they can read your database credentials, copy customer data, plant a backdoor or use the server to attack others.

CISA added both bugs to its list of exploited vulnerabilities on 26 October and gave US federal agencies three days to fix them.

Is this about you? If any of your sites or apps run on PHP (WordPress, Magento, Laravel, Drupal, most shared hosting and control panels), assume yes until your team has checked. Servers that only run PHP from the command line are not affected.

Ask your team or provider:

How fast: Today. The bugs are exploited, public exploit code exists, and patching does not remove a backdoor planted before the patch.

Need your PHP servers checked today?

We check every server and container for vulnerable PHP with read-only access, look for signs of a break-in, and patch or apply the workarounds in a window you approve.

For engineers

LineAffectedFixed in
PHP 8.5below 8.5.128.5.12
PHP 8.4below 8.4.278.4.27
PHP 8.3below 8.3.368.3.36
PHP 8.2below 8.2.358.2.35
PHP 8.1 and olderallNo release. The PHP team published source patches for 7.4, 8.0 and 8.1 only.

Distributions backport the fix without changing the PHP version number. Examples: Debian bookworm 8.2.35-1~deb12u1, Debian trixie 8.4.27-1~deb13u1, Ubuntu 24.04 8.3.6-0ubuntu0.24.04.13, Ubuntu 22.04 8.1.2-1ubuntu2.28, RHEL 10 8.3.36-1.el10_2. Official Docker php images were rebuilt on 21 October.

A related bug, CVE-2026-115560 (session data read in the wrong format), was fixed on 19 November in 8.2.36, 8.3.37, 8.4.28 and 8.5.13. It needs session upload progress and a suitable gadget in your application, so it is less urgent, but take those versions while you are patching.

When it can be exploited

Check if you are affected

php -v
php -i | grep -E 'memory_limit|session.upload_progress.enabled'

# Distribution packages: look for the CVE in the package changelog
apt changelog php8.2 2>/dev/null | grep -E 'CVE-2026-10961[89]'
rpm -q --changelog php 2>/dev/null | grep -E 'CVE-2026-10961[89]'

Check every place PHP runs: hosts, containers and images in your registry. php -v on the host tells you nothing about the PHP inside a container.

If you can't upgrade today

Updating is the only complete fix; the PHP project says none of the settings below is a full mitigation. They reduce exposure until you can update.

For CVE-2026-109618: set memory_limit to -1 with php_admin_value and keep post_max_size low (8M, or 32M if you need uploads). For CVE-2026-109619: set session.upload_progress.enabled to 0, and on PHP 8.5 also fatal_error_backtraces to 0. Restart all PHP workers after the change.

CISA says a web application firewall may give some protection, and that systems you cannot patch, including anything on PHP 8.1 or older, should be taken offline.

; php.ini or the pool / vhost config
session.upload_progress.enabled = 0
post_max_size = 8M
; PHP 8.5 only
fatal_error_backtraces = 0

; FPM pool (scripts cannot override php_admin_value)
php_admin_value[memory_limit] = -1
; Apache mod_php vhost equivalent: php_admin_value memory_limit -1

Signs you were already hit

CISA points to PHP workers that start shells or download tools, and has published a SIGMA rule for it. Researchers also report multipart requests followed by memory-limit errors or HTTP 500s, oversized PHPSESSID cookies and unexplained worker restarts.

Exploitation attempts were seen before the fix was public, so look back to at least early October, not only from the day you patched.

Prompt for your coding agent

Paste this into Claude Code, Codex or Cursor, opened in the repository that holds your server and deployment configuration. It only reads and proposes changes; review the diff before you apply it.

You are helping us respond to PHP2Shell (CVE-2026-109618 and CVE-2026-109619). Work read-only: do not change files, run deployments or restart anything. At the end, propose one diff for us to review.

1. Find every place this repository defines a PHP runtime: Dockerfiles and base images (php:*, bitnami/php*, serversideup/*, wordpress:*), docker-compose files, Kubernetes manifests and Helm values, Ansible/Terraform/Bicep that install PHP packages, CI pipelines that build PHP images, and composer.json `config.platform.php`.
2. For each, report the PHP version or image tag it pins and whether it is at or above the fixed releases: 8.2.35, 8.3.36, 8.4.27, 8.5.12 (better: 8.2.36, 8.3.37, 8.4.28, 8.5.13, which also fix CVE-2026-115560). Flag anything on PHP 8.1 or older as unsupported with no official fix.
3. Find the PHP configuration we ship (php.ini, conf.d, FPM pool files, Apache vhosts with php_value/php_admin_value). Report the values of memory_limit, post_max_size, session.upload_progress.enabled and, for PHP 8.5, fatal_error_backtraces.
4. Propose a diff that moves each runtime to a fixed version (keep the same major.minor and image variant) and, where an upgrade is not possible in this change, sets session.upload_progress.enabled=0 and post_max_size=8M as a stopgap. Do not touch memory_limit without telling us, because -1 removes a safety limit.
5. List anything you could not determine from the repository, such as PHP installed on hosts by hand.

Scripts

Timeline

  1. Amazon reports exploitation attempts before a fix is public.

  2. PHP releases 8.2.35, 8.3.36, 8.4.27 and 8.5.12. CISA rates exploitation as active and issues an alert. Ubuntu and the official Docker images ship fixes the same day.

  3. A honeypot records successful code execution against Apache mod_php on PHP 8.4.26.

  4. CISA adds both CVEs to the Known Exploited Vulnerabilities catalog, due 29 October.

  5. PHP fixes the related CVE-2026-115560 in 8.2.36, 8.3.37, 8.4.28 and 8.5.13.

Sources

Checked 22 Nov 2026. We update this page when the vendor, CISA or the distributions change the picture.