Mitigating PHP2Shell RCE Vulnerabilities CVE-2026-109618 and CVE-2026-109619 on Legacy PHP 5.6 Stacks with Varnish, Docker and Apache mod_php
Two critical remote code execution vulnerabilities collectively known as PHP2Shell (CVE-2026-109618 and CVE-2026-109619, CVSS 9.2) were disclosed on 21 October 2026, impacting the PHP interpreter at the Zend Engine level before any user code runs.
The flaws exploit the engine’s emergency exit via longjmp() during out-of-memory conditions and stale pointer reuse after fatal errors or timeouts, particularly when session.upload_progress tracking is active.
Patches were released only for currently supported branches (8.2.35, 8.3.36, 8.4.27, 8.5.12), leaving legacy PHP 5.6 installations without official fixes and especially vulnerable when running under Apache mod_php.
Original vulnerable architecture
The affected production environment uses Docker Compose on AlmaLinux with traffic flowing through Hitch TLS terminator, Varnish 6.0 LTS, and two Apache containers running mpm_prefork + mod_php (PHP 5.6.40 from Remi). Default settings included MaxConnectionsPerChild 1000, memory_limit 512M, and enabled session upload progress tracking, creating ideal conditions for both CVEs.
Layered mitigation strategy
The administrator applied four defensive layers. First, a dedicated zz-cve-2026.ini file disables session.upload_progress.enabled = 0 and sets memory_limit = -1, moving memory control to Docker cgroups while also tightening post_max_size, upload_max_filesize, and input limits.
Second, Docker resource limits cap each Apache container at 4 GB RAM, ensuring the kernel OOM killer terminates runaway processes without invoking PHP destructors. Apache configuration was changed to MaxConnectionsPerChild 1 and LimitRequestBody 33554432 to eliminate reuse of potentially corrupted worker memory.
Third, Varnish VCL rules block requests containing PHP_SESSION_UPLOAD_PROGRESS cookies or URLs and reject oversized POST bodies before they reach PHP backends.
Fourth, synthetic error responses for 403 and 413 status codes force Connection: close to prevent keep-alive drain attacks that could stall Varnish workers.
Testing results and edge cases
Verification confirmed that Varnish correctly returns 403 for malicious cookies on PHP routes while leaving Node.js backends unaffected. Direct Apache tests showed that LimitRequestBody and PHP’s post_max_size checks interact differently depending on whether an index.php handler is present, highlighting the need for defense-in-depth.
The complete set of controls neutralizes both PHP2Shell vectors on the unsupported legacy stack without requiring code changes or downtime.
Related articles
11-Year-Old Linux Kernel Race Condition NoisyTCP (CVE-2026-99288) Enables Remote DoS on Nginx, Apache and SSH Servers
Security researcher Hyunwoo Kim disclosed NoisyTCP (CVE-2026-99288), an 11-year-old race condition in the Linux kernel networking stack that allows unauthenticated remote attackers to trigger kernel panics and crash servers. The flaw stems from concurrent access to the ehash table during TCP socket lookup, where one CPU context may dereference a freed request_sock or full socket while another reuses the memory via SYN cookies. Exploitation requires multiple RX queues or RPS enabled and succeeds reliably on virtualized environments within seconds to minutes. Affected systems include nearly all distributions running kernels from 4.4 onward until the fix landed in November 2026. Temporary mitigations involve disabling SYN cookies or restricting traffic to a single RX queue, though both reduce resilience or performance. The researcher published full technical details on GitHub after coordinated disclosure.
Check Point Gateways Hit by PHP2Shell Exploits Installing TSGA Backdoor via Chained CVEs
An unidentified threat actor has been actively exploiting known vulnerabilities in unpatched Check Point Security Gateways to deploy the TSGA backdoor. The campaign began on 30 October 2026 against Israeli organizations and expanded on 2 November to targets across multiple countries and industries. Initial access leveraged CVE-2026-109618 and CVE-2026-109619 in exposed Mobile Access portals, followed by local privilege escalation through the previously unknown CVE-2026-123039 in Gaia OS. Attackers then installed PHP web shells and the TSGA backdoor, which provides encrypted remote access, configuration theft, persistence mechanisms, and log tampering via the embedded TSProxy component. In the first wave, operators pivoted to VMware ESXi hosts and deployed the destructive wiper destroy_v6. While tooling overlaps with the China-linked Armory Castle group’s PhiliKit framework, the use of a wiper and references to the Israel-Palestine conflict leave attribution open to three scenarios.
Apache Shiro Authentication Bypass Vulnerability Disclosed, Fixed in August Update
A critical authentication bypass vulnerability has been identified in the Java security framework Apache Shiro under specific LDAP caching configurations. The flaw, tracked as CVE-2026-129349, affects versions prior to 3.0.0 and carries a CVSSv4.0 base score of 9.1, rated Critical. Once a valid user authenticates successfully, subsequent login attempts using the cache accept any password for that username, enabling impersonation attacks. The Apache Shiro development team disclosed the issue on November 14, 2026, noting that the vulnerability was already resolved in version 3.0.1 released in August 2026. Version 3.0.2 was made available on November 8, 2026, and users are urged to upgrade immediately to the latest release.
Check Point Products Affected by Privilege Escalation Flaw CVE-2026-123039 Exploited in PHP2Shell Attacks
Check Point Software Technologies has disclosed a high-severity privilege escalation vulnerability in its security products that can allow attackers to obtain root privileges. The flaw, tracked as CVE-2026-123039, resides in the DynamicCLI component of Gaia OS, the operating system used by security gateways and management servers. With a CVSS base score of 7.8, the issue enables local code execution to be escalated to full root access and arbitrary command execution. Check Point confirmed that the vulnerability has already been exploited in the wild, specifically in attacks that first compromised the Mobile Access Portal using the PHP2Shell flaw and then chained to CVE-2026-123039. The company published the advisory on November 12, 2026, urging customers to apply available patches immediately to prevent further compromise of network security infrastructure.