# Using AWS WAF to apply mitigations for PHP2Shell RCE vulnerabilities (CVE-2026-109618 and CVE-2026-109619)

DevFeed: [Using AWS WAF to apply mitigations for PHP2Shell RCE vulnerabilities (CVE-2026-109618 and CVE-2026-109619)](<https://devfeed.tech/articles/using-aws-waf-to-apply-mitigations-for-php2shell-rce-vulnerabilities-cve-2026-109618-and-cve-2026-109619-94022.md>)

Original publisher: [Read original article](<https://aws.amazon.com/blogs/security/using-aws-waf-to-apply-mitigations-for-php2shell-rce-vulnerabilities-cve-2026-109618-and-cve-2026-109619/>)

Author: Alex Waddell

Published: 2026-10-22T00:50:04Z

Content type: tutorial

Language: en

Sources: [AWS Security Blog](<https://devfeed.tech/sources/aws-security-blog.md>)

Topics: [cve remediation](<https://devfeed.tech/topics/cve-remediation.md>), [vulnerability management](<https://devfeed.tech/topics/vulnerability-management.md>), [Amazon API Gateway](<https://devfeed.tech/topics/amazon-api-gateway.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [amazon-api-gateway](<https://devfeed.tech/tags/amazon-api-gateway.md>), [amazon-cloudfront](<https://devfeed.tech/tags/amazon-cloudfront.md>), [amazon-cloudwatch](<https://devfeed.tech/tags/amazon-cloudwatch.md>), [aws-waf](<https://devfeed.tech/tags/aws-waf.md>), [code-execution](<https://devfeed.tech/tags/code-execution.md>), [critical](<https://devfeed.tech/tags/critical.md>), [cve](<https://devfeed.tech/tags/cve.md>), [cve-2026-109618](<https://devfeed.tech/tags/cve-2026-109618.md>), [cve-2026-109619](<https://devfeed.tech/tags/cve-2026-109619.md>), [cvss](<https://devfeed.tech/tags/cvss.md>), [cvss-v4-0](<https://devfeed.tech/tags/cvss-v4-0.md>), [php](<https://devfeed.tech/tags/php.md>), [php2shell](<https://devfeed.tech/tags/php2shell.md>), [rce](<https://devfeed.tech/tags/rce.md>), [remote](<https://devfeed.tech/tags/remote.md>), [remote-code-execution](<https://devfeed.tech/tags/remote-code-execution.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [security-blog](<https://devfeed.tech/tags/security-blog.md>), [security-identity-compliance](<https://devfeed.tech/tags/security-identity-compliance.md>), [server](<https://devfeed.tech/tags/server.md>), [technical-how-to](<https://devfeed.tech/tags/technical-how-to.md>), [vulnerabilities](<https://devfeed.tech/tags/vulnerabilities.md>)

## AI overview

PHP2Shell affects PHP's multipart/form-data processing before application code runs; upgrading to PHP 8.5.12, 8.4.27, 8.3.36, or 8.2.35 is the only complete fix. During the patch window, AWS WAF can reduce exposure by blocking POST requests containing PHP_SESSION_UPLOAD_PROGRESS when a PHP session ID is present, blocking multipart requests where uploads are not needed, capping inspected body size, and rate-limiting POSTs. Start rules in Count mode, check logs and metrics for legitimate traffic, then switch to Block. WAF cannot inspect individual multipart part headers or PHP worker memory, so header-amplification attacks can remain within its limits; multipart rules also disrupt applications that require uploads. Pair edge rules with server settings such as disabling session upload progress and, where practical, recycling FPM workers after each request. The document also recommends PHP-level memory and error-handling mitigations, logging, and checking unsupported PHP versions with vendors for backported fixes.

## Source excerpt

On October 21, 2026, the PHP project released emergency fixes for two critical remote code execution (RCE) vulnerabilities in the PHP core runtime, tracked as CVE-2026-109618 and CVE-2026-109619 and collectively named PHP2Shell. Both are rated 9.2 (Critical) under CVSS v4.0, and both allow an unauthenticated attacker to run code on a vulnerable server. The fixed [...]