Skip to main content
Emerging ThreatsMalware & Ransomware

PHP Flaws Expose Network Devices to Code Execution Risk

Network device management interface in an operations center with rows of equipment.

The actor chained PHP2Shell with the Linux kernel flaw Fragnesia (CVE-2026-46300) to gain root on 25 systems — 24 firewalls and one management server — across the U.S., Japan, Taiwan, and South Korea.

Palo Alto Networks confirmation and the disclosure timeline

On October 28, Palo Alto Networks confirmed attackers were exploiting two PHP vulnerabilities, CVE-2026-109618 and CVE-2026-109619, against PAN-OS management interfaces exposed to the internet. Both flaws permit unauthenticated code execution on the web server. The coordinated disclosure process itself suffered a leak on October 20, and the PHP project pushed an emergency patch on October 21.

Palo Alto initially scored the issue 8.7 for its products and listed it at moderate urgency, then raised the rating to 9.2 (Critical) with the highest urgency on October 27 and later confirmed active exploitation a week after its advisory went out. Public scoring varied: the PHP project rated both flaws 9.2 under CVSS 4.0, and Fortinet's PSIRT listed 9.8 under CVSS v3.

Why appliances became the practical target

Exploitation was not trivial. Early analysis by VulnCheck found the bugs exploitable on ARM64 systems and on x86 systems without ASLR; few public exploits bypassed ASLR on x86-64, and one VulnCheck-confirmed exploit worked only against a single PHP build. Appliances change that calculus because identical, often outdated binaries are deployed widely — allowing an attacker to precompute memory offsets. In the PAN-OS case, the exploit leaked the libphp.so base address via the Set-Cookie header and had to contend with SELinux confinement. PAN-OS ships end-of-life PHP versions (8.0.30 and 7.4.33), and Israeli firm Dream — working with Palo Alto Networks — found the attacker had obtained PAN-OS firmware, decrypted it, extracted the PHP libraries, and built precise memory profiles for nine software versions.

HTTP, PHP parsing, and the memory mistakes that enable PHP2Shell

At the technical center of this incident is HTTP’s complexity and how PHP parses requests. A client can send chunked request bodies, compress them, and omit total length, making it hard for servers to predict memory needs. In PHP2Shell, a crafted multipart upload pushes PHP past its memory limit while it is still parsing the request and before any application code executes. Two distinct implementation flaws leave exploitable artifacts: an uninitialized request memory issue (CVE-2026-109618) and a pointer-to-freed-memory bug (CVE-2026-109619).

Critically, the attack payload need not be large. Deeply nested, empty file fields cause PHP to allocate far more memory than the body contains — so a request under the default 8 MB post_max_size can still exhaust the default 128 MB memory limit. These behaviors mean defenders must understand request shaping, multipart semantics, chunking, and decompression to detect or harden against such attacks.

Middleboxes, WAFs, and guidance for access controls

Middleboxes and web application firewalls (WAFs) proved an unreliable stopgap. Researchers at Intruder found that nginx placed in front of PAN-OS buffered chunked request bodies, which broke public exploit chains — an example of how intermediary behavior can both help and hinder defenders. Web application firewalls are “often not adequate,” the reporting notes, and blocking file uploads outright is not a practical option for many applications.

Palo Alto’s guidance for PHP2Shell was straightforward: remove internet access to management interfaces and restrict them to trusted internal IP addresses. If teams rely on a WAF, they must configure it properly and understand its limitations rather than assume it will block novel parsing or memory-corruption attacks.

What this means for technologists, procurement leaders, and defenders

  • Technologists and security teams: Study HTTP semantics and how your stack parses requests; signatures and mitigations require protocol-level knowledge to be effective, and simple configuration changes (for example, turning off session upload progress) may be insufficient, a warning attributed to PHP core developer Gina Peter Banyard.
  • Procurement and operations leaders: Treat appliances as software platforms — identical binaries and end-of-life components like PHP 8.0.30 and 7.4.33 are a practical risk because attackers can analyze firmware and build precise exploitation profiles for many deployed versions.
  • Network defenders and incident responders: Prioritize discovery and access restriction for administrative web interfaces on firewalls and other network equipment; evidence of widespread scanning or PoC attempts in logs does not, by itself, mean a given server is exploitable, because many public proofs of concept did not work reliably.

The PHP2Shell episode is a reminder that "everything is a web application" — even the devices we relied on to protect our networks. The specific chain here combined web-server parsing bugs, precomputed appliance memory profiles, and a kernel privilege escalation to turn unauthenticated HTTP requests into root on production devices. SANS is incorporating these lessons into SEC522, which will run at SANS Cyber Defense Initiative 2026 (December 14–18, Washington, D.C., and Live Online), covering HTTP/2, HTTP/3, file uploads, API security, and related defensive labs.

Original story