Latest

Cybersecurity

PHP2Shell and Fragnesia: root on 24 security firewalls

Dream documents how a PHP RCE and a kernel flaw give root on 24 PAN-OS devices and an internal server. The second hole was not Palo Alto's.

PHP2Shell and Fragnesia: root on 24 security firewalls
PHP2Shell and Fragnesia: root on 24 security firewalls

Dream Research published a report worth reading slowly: an attacker chained two different flaws, one in PHP and one in the Linux kernel, and obtained root on 24 Palo Alto Networks firewalls plus an internal management server. The time per target, once the tool was set up, was under fifteen minutes. Initial access required no credentials of any kind.

The report describes the full operation, not just the result. Dream identified some 19,000 internet-exposed firewalls with the FOFA asset search engine, received version responses from about 5,000, filtered by country and PHP profile until 240 candidates remained, and launched an automated executor that ran five at a time. Of those 240, 24 ended up with root.

The part that has been least reported is the second one. The first hole, PHP2Shell, allowed code execution as the `nobody` user, and that is where it would have ended: SELinux prevents that process from writing to system files. The escalation came with Fragnesia, a Linux kernel vulnerability, not a PAN-OS one, that turns that limited access into root. Without that second flaw, the attacker would have had a useless webshell in the best spot on the network.

The chain, step by step

PHP2Shell is two vulnerabilities, CVE-2026-109618 and CVE-2026-109619, with a score of 9.2. They affect the PAN-OS management web server, `appweb`, which also serves the GlobalProtect portal, and the vector lies in PHP's `session.upload_progress` mechanism. The PHP2Shell chain analysis on the site itself already explained why that mechanism is sensitive when the interface faces the internet.

Dream maintains that the exploit used was not a public copy: it was a custom implementation, tailored to the specific PHP version running on those PAN-OS releases. The process involves exhausting memory until the allocator is left in a predictable position, leaking an address with an out-of-bounds read, and then forging a table entry that points to the `system()` function.

The result is command execution as `nobody`. Fragnesia, registered as CVE-2026-46300, exploits the XFRM ESP-in-TCP subsystem to write to the page cache and overwrite `/etc/pam.d/su`, a 774-byte file, with a rule that accepts any authentication. After that, `su root` works without a password.

Exercising control on the target

On 22 of the 24 firewalls there was nothing more. The executor installed a 103-byte webshell in an accessible path, verified access with `id`, recorded the machine's name and IP in a CSV of successes and moved on to the next one. That apparent restraint is misleading: a root webshell at the perimeter is a door that can be opened whenever convenient.

On two machines there was a second phase, and both appeared to belong to the same US government environment. The attacker set up an eight-port reverse SSH tunnel configured to survive reboots, entered the internal management server from there at 11:35 UTC on 24 October, decrypted the password of an LDAP service account and enumerated users and groups in the directory.

The report details some 40 post-exploitation scripts, private keys extracted from the PAN-OS file system and network topology maps. What it cannot state is whether the next step worked: there is no conclusion on password spraying attempts, creation of new accounts or extraction of SAML keys.

The second flaw is in the Linux kernel

The most useful technical lesson lies in the composition. A PHP flaw on the management server was fixed with a Palo Alto patch. A Linux kernel flaw that allows writing to read-only pages required another patch, and that one depends on the kernel packaged by the vendor of the security appliance.

That is where an inventory problem emerges that recurs across the industry. The kernel CVE triage has already shown that more records arrive than a team can assess, and that the criterion of "does this run on my version?" is harder to answer than it seems when the kernel sits inside the vendor's firmware.

Dream attributes the campaign to a Chinese actor and describes forensic traces of DeepSeek, Kimi and Claude Code sessions in the artifacts. That detail has been cited as proof that the operation was AI-assisted, and it is not: what the artifacts show are development sessions, not the launch of the attack. The ARTEX case and automated pentesting did document operational use; here the evidence is thinner and the two should not be confused.

There is a practical consequence for anyone reviewing a fleet of security appliances. The inventory must include the kernel version running inside the firmware, not just the version of the system advertised in the interface. A firewall with an updated PAN-OS and an old kernel remains vulnerable to the second half of the chain, and that detail does not appear in any management console.

What to do if you are exposed?

The Cyber Security Agency of Singapore published on November 3 a alert over active exploitation with the recommendations that matter: update PAN-OS on the affected branches, restrict access to management interfaces to trusted networks, and look for signs of escalation and persistence on machines that have been exposed.

Restricting access deserves more attention than it gets. The chain needs to reach `appweb` from the internet, and in most deployments that panel has no reason to be published. A tunnel, a VPN or an allowlist halves the problem without depending on the vendor publishing on time.

For anyone who has to review already compromised machines, Dream's list is the starting point: new files in public system paths, reverse SSH tunnels that survive reboots, altered PAM rules and service accounts whose use does not match the inventory. None of those signals appears on a status panel, and all of them require access to the device's file system. The Ivanti chain in Connect Secure left the same trail of perimeter appliances with root access and no clear owner for patching.

An uncomfortable conclusion about scope remains. The figures are Dream's, not a vendor advisory: Unit 42 verified the tool and the results, but the count of 24 machines and one server is an estimate by the firm that investigated the incident. What Palo Alto has confirmed is that patched versions exist, and that turns this week's question into just one: how many of the 5,000 firewalls that responded with their version are still waiting for the update.

José Maldonado

Author

José Maldonado

Activist and blogger on technology, free software and blockchain.

The latest
From Huang to Botín, from Zara to Byron: corporate responsibility in global capitalism

Keep reading