PHP2Shell (CVE-2026-109618 and CVE-2026-109619): what it is and how to protect your PHP servers

Vulnerabilidades
22 Oct 2026, 5:21 p.m. By Juan Carlos Hernandez 💬 0
PHP2Shell (CVE-2026-109618 and CVE-2026-109619): what it is and how to protect your PHP servers
Updated October 22, 2026: exploitation attempts are under way. If your company runs websites or applications on PHP, patch today.

PHP2Shell is the name given to two critical vulnerabilities in the PHP engine, CVE-2026-109618 and CVE-2026-109619, rated CVSS 4.0 9.2 and disclosed on October 21, 2026. A remote, unauthenticated attacker can use them to run code on the server. The fix is to upgrade to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35 and restart every PHP worker.

What is PHP2Shell?

They are two flaws in how PHP handles each web request, before your application code runs:

  • CVE-2026-109618 (out of memory): if memory runs out while PHP is preparing its internal request data, the cleanup that follows treats half-initialized data as valid.
  • CVE-2026-109619 (use-after-free): state left over from one request points to freed memory, and the next request handled by the same worker can use it. PHP confirms it allows reading server memory.

It affects PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The riskiest setup is mod_php: a single unauthenticated request can trigger the attack before your application does anything. That is why it does not matter whether your WordPress, Laravel or Moodle is up to date: the flaw is in PHP.

Which PHP versions are affected by CVE-2026-109618 and CVE-2026-109619?

PHP 8.5 before 8.5.12 → upgrade to 8.5.12.
PHP 8.4 before 8.4.27 → upgrade to 8.4.27.
PHP 8.3 before 8.3.36 → upgrade to 8.3.36.
PHP 8.2 before 8.2.35 → upgrade to 8.2.35.
PHP 7.4 to 8.1: no official release; use your distribution's or LTS vendor's fixed package, or the PHP security team's minimal source patches.
PHP 5.4 to 7.3: end of life with no fix: migrate to a supported version.

Is PHP2Shell being exploited?

Yes, there are attempts. Amazon saw an attempt against its honeypots on October 17, four days before disclosure, and now reports broad exploitation. The identifiers leaked on October 20 and PHP moved its release up a day, to October 21 at 14:00 UTC. Unit 42 (Palo Alto Networks) counts more than 22.6 million exposed instances that may be vulnerable.

Two clarifications: the official score is 9.2, not the 10.0 that circulated early, and the PHP Foundation had not identified working exploits at release; the proof-of-concept code going around is unverified. Every vendor's advice is still the same: patch now.

What should your company do today?

1. Inventory: find where PHP runs: servers, containers, shared hosting or panels such as Plesk and cPanel, and appliances that bundle it.
2. Upgrade: install the fixed version for your branch and restart every PHP worker (PHP-FPM, Apache); without a restart the patch does not apply.
3. If you cannot upgrade today: PHP suggests session.upload_progress.enabled=0 (CVE-2026-109619; on PHP 8.5 also fatal_error_backtraces=0) and memory_limit=-1 that the application cannot override (CVE-2026-109618), with a container memory limit to stay available. Restart the workers afterwards. These are mitigations, not the fix.
4. Virtual patch in the WAF while you upgrade (see below).
5. Log review since October 17: PHP memory errors, workers that keep restarting and unusual POST requests.
6. Isolation: if an internet-facing application cannot be patched, take it offline until it is fixed.

How does Rescue WAF protect you while you upgrade PHP?

A web application firewall does not fix PHP, but it reduces exposure while patches go in. In Rescue WAF these are configured per site as a virtual patch:

Blocking the CVE-2026-109619 vector: POST requests that combine the PHP session cookie (PHPSESSID) with the PHP_SESSION_UPLOAD_PROGRESS field, first in monitoring mode so the application is not affected.
Request body size limits on routes that do not accept file uploads, which reduces the memory exhaustion behind CVE-2026-109618.
Blocking multipart/form-data where the application takes no uploads.
Per-IP POST rate limits and CrowdSec reputation blocking to cut off those already scanning.
Logging every attempt, which reaches the SOC as an incident.

The limits are clear: according to AWS, one of the two flaws is "largely outside the reach of any web application firewall", and traffic that does not go through the WAF is not protected. Patching is still mandatory.

What does Rescue SOC add against PHP2Shell?

Vulnerability inventory: agents report each server's software, so servers running an affected PHP version are found and internet-facing ones go first.
Post-exploitation detection: alerts when the PHP process runs commands, new files appear in the site's folders (possible web shells) or unusual outbound connections show up.
Correlation with Rescue WAF: a blocked attempt at the WAF plus odd activity on the same server becomes a priority case.
Analyst-led response: the alert is validated, the host is contained and every action is documented.

Learn about Rescue SOC. If you suspect your server is already compromised, call our 24/7 incident response; after patching, a penetration test confirms the fix was applied correctly.

PHP2Shell frequently asked questions

What is PHP2Shell?

It is the name of two critical vulnerabilities in the PHP engine, CVE-2026-109618 and CVE-2026-109619, disclosed on October 21, 2026. They let a remote, unauthenticated attacker run code on or read memory from the server.

Is my WordPress vulnerable to CVE-2026-109618?

If the server runs an affected PHP version, yes, even if WordPress and its plugins are up to date: the flaw is in PHP, not the application. Ask your hosting provider to confirm the PHP version and upgrade it.

How do I check my PHP version?

On the server, run php -v; on shared hosting, check the panel (Plesk, cPanel) or ask the provider. Do not leave a phpinfo() page exposed.

What is the CVSS score of CVE-2026-109618 and CVE-2026-109619?

9.2 in CVSS 4.0 for both. The 10.0 that circulated early is not PHP's official score.

Is a WAF enough to protect against PHP2Shell?

No. A WAF reduces exposure while you upgrade, but it does not fix PHP and one of the flaws is largely outside its reach. You must install the fixed version.

What if I run PHP 7.4, 8.0 or 8.1?

There is no official fixed release: use your distribution's or an LTS vendor's fixed package, or PHP's minimal patches, and plan the move to a supported version.

Sources

  1. Tenable. php2shell (CVE-2026-109618, CVE-2026-109619): Frequently Asked Questions About Critical PHP Remote Code Execution Vulnerabilities. 2026 https://www.tenable.com/blog/php2shell-cve-2026-109618-cve-2026-109619-frequently-asked-questions-about-critical-php-remote
  2. AWS Security Blog. Using AWS WAF to apply mitigations for PHP2Shell RCE vulnerabilities (CVE-2026-109618 and CVE-2026-109619). 2026 https://aws.amazon.com/blogs/security/using-aws-waf-to-apply-mitigations-for-php2shell-rce-vulnerabilities-cve-2026-109618-and-cve-2026-109619/
  3. Palo Alto Networks Unit 42. Threat Brief: Critical Vulnerabilities in PHP: CVE-2026-109618, CVE-2026-109619. 2026 https://unit42.paloaltonetworks.com/cve-2026-109618-cve-2026-109619/
  4. Red Hat. CVE-2026-109618. 2026 https://access.redhat.com/security/cve/cve-2026-109618

Do you have PHP servers exposed to the internet?

We help you inventory them, apply the virtual patch in Rescue WAF and watch them with Rescue SOC while you upgrade.

Talk to a specialist

You may also like

Comments (0)

Be the first to comment.