13 min to read
Palo Alto Firewalls Rooted: The PHP2Shell + Fragnesia Chain and What to Do Now
One request to an exposed management page, root on the firewall, then a walk into Active Directory
On 25 November, Palo Alto Networks published security bulletin PAN-SA-2026-0015 and confirmed what researchers had been describing for a month: attackers are getting root on PAN-OS firewalls. They get in through PHP2Shell, the pair of critical PHP bugs, and then use Fragnesia (CVE-2026-46300), a Linux kernel flaw, to escalate. Palo Alto says every attack it has seen targeted a device whose management interface was exposed to the internet (Palo Alto Networks, Cyber Security News).
The one compromise documented in detail did not stop at the firewall. Researchers at Dream watched the attacker tunnel from a rooted firewall into the internal network, take a management server, decrypt an LDAP service account password, and start password-spraying every user in Active Directory (Dream). PAN-OS firewalls are common across Pakistani banks, telcos and government, so if you run one, this is today’s job.
TL;DR / Key takeaways
- The chain: PHP2Shell (CVE-2026-109618 / CVE-2026-109619, CVSS-BT 9.2) on the PAN-OS management web interface gives code execution as
nobody. Fragnesia (CVE-2026-46300, CVSS 7.8) turns that into root. Dream says the chain takes under 15 minutes from a single unauthenticated HTTPS request.- Who is at risk: PA-Series and VM-Series firewalls and Panorama whose management web UI or XML API is reachable from the internet, either on the MGT port or on a dataplane interface with a management profile. GlobalProtect portals and gateways, Prisma Access and Cloud NGFW are not affected by PHP2Shell.
- Patch: builds that fix PHP2Shell break the known chain. Builds that also fix Fragnesia include 10.2.18-h15, 11.1.16-h6, 11.2.16-h3, 12.1.10-h6 and 12.2.4-h3 (full list below). Note that 12.2.4-h1 fixes PHP2Shell but not Fragnesia.
- Lock down management today: take it off the internet and allow only trusted internal IPs or a jump host. That one change takes away the only known way in.
- Patching does not tell you whether you were already hit. If your management interface was ever exposed after mid-October, hunt for compromise and check your Active Directory.
What happened (timeline)
| Date | Event |
|---|---|
| 13 May 2026 | Fragnesia, a Linux kernel privilege-escalation bug, is disclosed by William Bowling (V12) with a public proof-of-concept (Tenable) |
| 8 Oct | According to Dream, the attacker starts setting up the campaign |
| 20-21 Oct | PHP fixes PHP2Shell; Palo Alto ships Threat Prevention coverage (Threat ID 543004) and publishes its PHP2Shell advisory (Palo Alto Networks) |
| 23 Oct | First government-affiliated PAN-OS firewall rooted, per Dream (The Register) |
| 24 Oct | Second firewall rooted; reverse SSH tunnel built; internal management server exploited within about 90 minutes (Dream) |
| 27-29 Oct | Palo Alto raises the PHP2Shell advisory to Critical and finishes releasing hotfixes across supported branches; Unit 42 confirms active exploitation against exposed management interfaces (Palo Alto Networks, Unit 42) |
| 28 Oct | CISA adds Fragnesia (CVE-2026-46300) to its Known Exploited Vulnerabilities catalog (Security Affairs) |
| 24-25 Nov | Palo Alto publishes PAN-SA-2026-0015 with PAN-OS builds that fix Fragnesia, and confirms it is being exploited (Palo Alto Networks) |
We covered PHP2Shell in October and a near-identical Check Point chain two weeks ago.
How the chain works (conceptually)
Stage 1: PHP2Shell on the management web server. The PAN-OS management web UI and XML API run on PHP. CVE-2026-109618 and CVE-2026-109619 are memory-safety bugs in how PHP recovers from out-of-memory and fatal errors. The first leaves request memory uninitialised. The second leaves global pointers aimed at memory that has already been freed (Palo Alto Networks). Dream says the attacker’s exploit was a “custom, non-public build” tailored to the PHP versions PAN-OS ships. It used crafted multipart upload requests to push PHP’s memory use up by hundreds of megabytes, leak an address, and then hijack a function call so it ran system commands as the low-privileged nobody user (Dream).
Stage 2: Fragnesia to root. CVE-2026-46300 is a logic flaw in the Linux kernel’s XFRM ESP-in-TCP code. When the kernel merges network buffer fragments, it loses track of the fact that some pages are shared. That lets a local user write into the in-memory (page cache) copy of read-only files without changing anything on disk. It needs no race condition, and the public proof-of-concept tampers with su to get root (Tenable). On PAN-OS, Dream says the attacker used it within the same request to rewrite /etc/pam.d/su so that su root needed no password.
Stage 3: Persistence and pivot. Dream reports a tiny root web shell at /unauth/php/change_password.php, scripts launched from /usr/local/lib/.panops/ through a systemd service and an rc.local hook, and an eight-port reverse SSH tunnel. The tunnel exposed domain controller LDAP, LDAPS and RDP, the internal management server, GlobalProtect, and a SOCKS5 proxy. The attacker also took HA replication keys, SSL/TLS private keys and device authentication keys from the firewall (Dream).
Stage 4: Into identity. Using the device master key, the attacker decrypted the firewall’s LDAP service account password. They then enumerated all AD users and groups, sprayed passwords against a domain with no lockout threshold, tried to create backdoor user and machine accounts by abusing the default MachineAccountQuota, and tried to extract SAML signing keys. Dream could not tell whether those last steps worked (Dream).
Scale and attribution
Dream counts 25 servers rooted: 24 firewalls plus one internal management server. Targets were in the US, Japan, Taiwan and South Korea, and two of the firewalls belonged to a US government-affiliated organisation. The attacker used the FOFA search engine to fingerprint about 19,000 internet-facing PAN-OS firewalls, narrowed those to 240 targets, and rooted 24 in an automated batch. Unit 42 tracks the activity as CL-UNK-1280 and independently verified Dream’s findings. Dream suspects a China-nexus actor (Dream, The Register).
Palo Alto says about 0.02% of its installed base had internet-facing management interfaces and was affected, and that it has contacted those customers individually (Unit 42). Dream quotes Palo Alto telemetry showing “continued exploitation attempts against exposed PAN-OS devices.” The 19,000 fingerprinted targets are still out there.
Am I affected?
Go through these questions for every PA-Series, VM-Series and Panorama instance you run.
- Can the management web UI or XML API be reached from the internet? Check the MGT port and every dataplane interface that has a management profile with HTTPS enabled. Test from outside your network, not just by reading the configuration. If the answer is yes, you are in the population being attacked.
- Which version are you on? Run
show system infoand compare thesw-versionwith the tables below. If you are below the PHP2Shell fix for your train, the known chain works against you. - Are you below the Fragnesia fix? The kernel bug only helps an attacker who already has code running on the box, but it is in KEV, and Palo Alto still advises upgrading at your next maintenance window.
- Was the device exposed at any point since mid-October, even briefly? If so, assume you need to hunt, even if it is patched now.
Not affected by PHP2Shell: GlobalProtect portal, gateway and Clientless VPN; Captive Portal; Prisma Access; Cloud NGFW (Palo Alto Networks).
Fixed builds
PHP2Shell (CVE-2026-109618/9), the initial access stage. Fixed in, or later on the same train (advisory):
| Branch | Fixed hotfixes |
|---|---|
| 12.2 | 12.2.4-h1 |
| 12.1 | 12.1.4-h13, 12.1.7-h11, 12.1.10-h3 |
| 11.2 | 11.2.4-h23, 11.2.7-h23, 11.2.10-h16 (11.2.10-h17 also fixes brotli), 11.2.13-h4, 11.2.16-h1 |
| 11.1 | 11.1.4-h38, 11.1.6-h40, 11.1.7-h12, 11.1.10-h36, 11.1.13-h16, 11.1.16-h4 |
| 10.2 | 10.2.7-h39, 10.2.10-h42, 10.2.13-h27, 10.2.16-h12, 10.2.18-h13 |
Fragnesia (CVE-2026-46300), the root stage. Fixed in, or later (PAN-SA-2026-0015):
| Branch | Fixed hotfixes |
|---|---|
| 12.2 | 12.2.4-h3 |
| 12.1 | 12.1.4-h15, 12.1.7-h15, 12.1.10-h6 |
| 11.2 | 11.2.4-h25, 11.2.7-h25, 11.2.10-h19, 11.2.13-h6, 11.2.16-h3 |
| 11.1 | 11.1.4-h40, 11.1.6-h42, 11.1.7-h14, 11.1.10-h38, 11.1.13-h18, 11.1.16-h6 |
| 10.2 | 10.2.7-h41, 10.2.10-h45, 10.2.13-h29, 10.2.16-h14, 10.2.18-h15 |
If you are moving to one of these builds anyway, pick the Fragnesia build and fix both stages in one change. Unsupported PAN-OS versions get no fix, so upgrade them to a supported release.
Detection and hunting
1. Firewall threat logs. Unit 42’s guidance is to search vulnerability threat logs for Threat ID 543004 and PHP2Shell-related signatures, focusing on traffic from public IPs (Unit 42). Palo Alto’s advisory also lists a set of 976xx Threat IDs, which need Applications and Threats content version 9162 or later (advisory). The Splunk example below uses typical Palo Alto add-on field names, so adjust them for your SIEM:
index~|=|pan_logs sourcetype~|=|"pan:threat" log_subtype~|=|"vulnerability"
(threat_id~|=|543004 OR threat_name~|=|"*php*" OR threat_name~|=|"*upload.progress*"
OR threat_name~|=|"*CVE~|-|2026~|-|10961*")
| where NOT cidrmatch("10.0.0.0/8", src_ip) AND NOT cidrmatch("172.16.0.0/12", src_ip)
AND NOT cidrmatch("192.168.0.0/16", src_ip)
| stats count min(_time) as first max(_time) as last values(action) by src_ip dest_ip threat_name
| convert ctime(first) ctime(last)
If any hit has an action of alert instead of reset/drop, or if the management interface sat outside Threat Prevention altogether, treat the device as possibly compromised.
2. On-box review. From the CLI, look for admin activity and configuration changes you can’t explain:
show system info
show admins all
show log config direction equal backward
show log system direction equal backward
Watch for unexpected admin logins, new admin accounts, management-profile or permitted-IP changes, and unplanned reboots or crashes. Dream saw one firewall crash under the weight of exploit traffic. Customers can’t easily inspect the underlying Linux filesystem, so if you suspect compromise, open a case with Palo Alto TAC or Unit 42 IR, generate a tech support file, and pass on Dream’s published artefacts: /unauth/php/change_password.php, /usr/local/lib/.panops/, a tampered /etc/pam.d/su, and unexpected systemd units or rc.local entries.
3. Network. Look for outbound SSH from firewall management IPs to the internet, SOCKS traffic sourced from the firewall, and the firewall’s IP connecting to domain controllers on RDP. In normal operation a firewall should never open an RDP session to a DC.
4. Active Directory. Hunt for the identity stage, which is where the real damage happens. This KQL example is for Microsoft Sentinel SecurityEvent:
let fw ~|=| dynamic(["10.1.1.1","10.1.1.2"]); // firewall and Panorama management IPs
SecurityEvent
| where TimeGenerated > ago(45d)
| where IpAddress in (fw)
| where EventID in (4625, 4771, 4720, 4741, 4728, 4732, 4756, 5136)
| summarize events~|=|count(), accounts~|=|dcount(TargetUserName),
sample~|=|make_set(TargetUserName, 20) by EventID, IpAddress, bin(TimeGenerated, 1h)
| order by TimeGenerated desc
A spike of failed logons (4625/4771) across many accounts from one source points to spraying. New user (4720) or computer (4741) accounts nobody can explain should be treated as backdoors. Also check the LDAP bind account the firewall uses for User-ID or authentication: is it being used from anywhere other than the firewall?
Prioritised action checklist
Immediately (today)
- Remove internet access to the management web UI and XML API on every device. Restrict it to trusted internal IPs or a jump host with
set deviceconfig system permitted-ip <trusted-subnet>, and remove HTTPS from management profiles on internet-facing interfaces. - Upgrade internet-exposed devices to a build that fixes both PHP2Shell and Fragnesia.
- Make sure Threat Prevention content is at version 9162 or later and that Threat ID 543004 is set to block where management traffic crosses a dataplane interface.
- Run the threat-log and AD hunts above for activity from mid-October onwards.
This week
- Bring all remaining firewalls and Panorama up to the Fragnesia builds during maintenance windows.
- On any device that was exposed: rotate the master key, the LDAP/RADIUS service account passwords, admin passwords, API keys, SSL/TLS certificates and private keys, and the HA keys. Dream saw all of these being harvested.
- Set an AD account lockout threshold, set
ms-DS-MachineAccountQuotato 0, and check that your SAML IdP certificate validation is enabled on the firewall (Dream foundvalidate-idp-certificate: no). - If you find indicators, isolate the device, preserve a tech support file, and engage IR before you rebuild it. Treat the firewall’s credentials and the AD accounts it could reach as compromised.
Longer term
- Put management planes for all network and security appliances (firewalls, VPNs, load balancers, hypervisors) on a dedicated management network behind a jump host, and alert if any of them becomes reachable from the internet.
- Add appliance management interfaces to your external attack surface monitoring, and test from outside every quarter.
OffensioX perspective
This is the second time this month that a firewall vendor has had customers rooted through the same PHP flaw. The first was Check Point, and now Palo Alto Networks. Neither bug started in the vendors’ own code. One is in the PHP interpreter and the other is in the Linux kernel underneath. An appliance is a full Linux server with a web stack and inherits every bug in it: Fragnesia had a public exploit in May and was rooting firewalls by October.
The more uncomfortable lesson is that almost every victim broke a rule that has been in vendor hardening guides for a decade: never expose the management plane to the internet. The attacker did not need GlobalProtect or any user-facing service. They needed one admin page that should never have been reachable. Once the firewall fell, it handed over the keys to identity: LDAP credentials, certificates and SAML trust. Treat appliances as tier-0 assets, the same as domain controllers.
If you want an independent check of what your perimeter exposes and how far a rooted appliance could reach, OffensioX’s penetration testing and external attack-surface assessments are built for exactly that.
References
- Palo Alto Networks: PAN-SA-2026-0015 / CVE-2026-46300 (Fragnesia) fixed in PAN-OS
- Palo Alto Networks: CVE-2026-109618 Impact of critical vulnerabilities in PHP on Palo Alto Networks products
- Unit 42: Threat brief on CVE-2026-109618 and CVE-2026-109619 (PHP2Shell)
- Dream: Chained PHP2Shell exploit roots 25 servers
- The Register: Suspected Chinese attackers built a custom PHP2Shell exploit and rooted 25 servers
- Cyber Security News: Palo Alto Networks confirms hackers are exploiting Fragnesia flaw to gain root access to firewalls
- Cyber Security News: Palo Alto PHP2Shell exploitation
- Tenable: Fragnesia (CVE-2026-46300) FAQ
- Security Affairs: CISA adds Linux kernel and VMware ESX flaws to KEV
- OffensioX: PHP2Shell, what happened and what to do
- OffensioX: Check Point gateways under attack, hunting PHP2Shell