Skip to content
RCE Write-up Advanced

The Guard Became the Target: Inside the Palo Alto PAN-OS Attacks That Rooted Firewalls in 15…

Attackers chained two remote code execution flaws in PHP (PHP2Shell) with a Linux kernel privilege escalation flaw (Fragnesia) to gain root on internet-facing PAN-OS firewalls. They then planted a persistent web shell, opened reverse SSH tunnels, and moved into the internal network.

Mishfahkhan Follow

Published on medium.com

The original lives on medium.com

We do not hold its text, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

The management interface is served by a PHP web application. The advisory discussed here, PAN-SA-2026-0015, confirmed on 25 November 2026 that attackers were actively exploiting PAN-OS firewalls in the wild. The chain they used has two named stages: PHP2Shell, the way in, and Fragnesia, the climb to root.

The uncomfortable detail is that none of the three vulnerabilities in the chain is Palo Alto code. The entry point is PHP, the escalation is the Linux kernel, and the KEV catalogue files the flaws under their authors, PHP Group and Linux Kernel, not under Palo Alto. A team whose vulnerability monitoring is filtered by the vendors in its own inventory sees none of the three CVEs.

Setup

The precondition for every observed attack was the same: a PAN-OS firewall with its management interface exposed directly to the public internet. Palo Alto's own data says 100 percent of the observed exploitation attempts hit internet-facing management interfaces. No credentials were needed for the first stage, because the PHP flaws are unauthenticated remote code execution.

The campaign behind the advisory is documented. Security firm Dream Research traced it to an apparently Chinese, AI-assisted operation that scanned about 19,000 internet-facing PAN-OS management portals, narrowed the list to 240 targets, and rooted 25 firewalls across the United States, Japan, Taiwan and South Korea, including at least three affiliated with the US government. Palo Alto's Unit 42 team independently verified the tooling and the results.

Both halves of the chain were already on CISA's Known Exploited Vulnerabilities (KEV) catalogue before Palo Alto's advisory: PHP2Shell was added on 26 October 2026 and Fragnesia on 28 October. Their federal patch deadlines, 29 October and 31 October, had already passed. On 28 October, CISA had already warned of a targeted campaign using multi-vulnerability exploit chains against enterprise edge appliances; the firewall attacks are that campaign.

Finding it

The chain works in two stages, and each stage on its own would not be enough. The first stage gives the attacker a foothold with the weakest possible privileges, not a takeover. The second stage is a local kernel bug that cannot be triggered remotely on its own and needs code already running on the machine, which is exactly what the first stage provides. The full chain, from one unauthenticated HTTPS request to a persistent root web shell, completes in under 15 minutes.

Exploitation

Step 1: PHP2Shell, the way in

CVE-2026-109618 and CVE-2026-109619 are remote code execution flaws in PHP, the language behind the firewall's web management interface. They need no login. An attacker sends crafted HTTP requests to the web server running on the firewall's management interface, and the flaws let them run arbitrary commands as the low-privilege PHP web worker process, the "nobody" user. At this point the attacker is inside the box with the weakest possible privileges: a foothold, not a takeover.

Step 2: Fragnesia, the climb to root

CVE-2026-46300 is a high-severity Linux kernel vulnerability in the XFRM ESP-in-TCP subsystem, caused by a missing variable initialization, so ESP input processing ends up decrypting shared fragments in place. From the compromised web worker process, the attacker triggers Fragnesia and escalates to root, overwriting a system file in the page cache so that switching to root no longer needs a password.

Step 3: Persistence and pivoting

Once they have root, the attackers make it stick. They plant a persistent PHP web shell at:

Text
/unauth/php/change_password.php

They open reverse SSH tunnels out of the firewall, and pivot from the firewall into the network behind it, including password spraying in Active Directory from a service account. The device that was supposed to be the boundary becomes the beachhead.

Root cause

PHP2Shell is an unauthenticated remote code execution flaw in the PHP application serving the management interface, which hands the attacker code execution as the low-privilege web worker. Fragnesia is a missing variable initialization in the Linux kernel's XFRM ESP-in-TCP subsystem, which lets ESP input processing decrypt shared fragments in place; it is local-only and needs existing code execution to trigger. Neither half is a takeover alone, and the two together cross the privilege boundary from web worker to root.

First, the management interface was reachable from the internet, which is the exposure every observed attack relied on and which Palo Alto's own long-standing guidance says should never happen. Second, vendor-filtered vulnerability tracking missed the chain entirely: the KEV catalogue files the flaws under PHP Group and Linux Kernel, so a team that watches the KEV catalogue filtered by the vendors in its own inventory sees none of the three CVEs. The watchlist was correct; the query was wrong.

Impact

Any organisation running PAN-OS with the management interface reachable from the internet was in the target set; the campaign scanned roughly 19,000 such portals. The 25 confirmed compromises span the United States, Japan, Taiwan and South Korea and include at least three US government-affiliated firewalls. The risk is not limited to the scanned set: any device running an affected PAN-OS build still needs the fix, and restricting exposure does not replace a compromise check if the interface was ever reachable.

On a compromised device the attacker holds root, can plant a persistent PHP web shell, can open reverse SSH tunnels out of the firewall, and can pivot into the network behind it, including password spraying in Active Directory from a service account. The firewall that was meant to be the boundary becomes the beachhead.

Fix

Palo Alto's fix is a PAN-OS upgrade. Fixed builds are listed in PAN-SA-2026-0015 across the 10.2, 11.1, 11.2, 12.1 and 12.2 branches, including:

Branch Fixed build
10.2 10.2.18-h15
11.1 11.1.16-h6
11.2 11.2.16-h3
12.1 12.1.10-h6
12.2 12.2.4-h3

One trap: build 12.2.4-h1 fixes PHP2Shell but not Fragnesia, so it does not break the chain. Check the exact build against the advisory list, not just the branch, because a PHP2Shell-fixed build may still predate the Fragnesia fix. Patching only one half leaves the chain intact.

Take the management interface off the internet. This is Palo Alto's long-standing best practice, and every observed attack hit an exposed interface. Allow access only from trusted internal addresses, a jump host, or a VPN.

Hunt before you close the door. Patching removes the vulnerability, not an attacker who already got in. Look for the web shell at /unauth/php/change_password.php, reverse SSH tunnels originating from your firewalls, and password spraying in Active Directory from a service account. If you find any of these, treat the firewall as compromised, rebuild it, and rotate credentials reachable from it.

Fix your watchlist, not just your firewall. If your KEV or advisory monitoring is filtered by vendor, add a feed that tracks the open-source components inside your products: PHP, the Linux kernel, and the other libraries your appliances embed.

Variants to test

  • Check whether your KEV or advisory monitoring is filtered by vendor name. A positive result is a query that returns none of CVE-2026-109618, CVE-2026-109619 or CVE-2026-46300 even though the affected product is in your inventory.
  • Check whether a build you believe is fixed actually covers both halves of the chain. A positive result is a build that fixes PHP2Shell but predates the Fragnesia fix, as with 12.2.4-h1.
  • Check for the persistence artefacts on any firewall whose management interface was ever reachable: the web shell path, reverse SSH tunnels originating from the device, and password spraying from a service account in Active Directory.

Hunting notes

The second signal is a blind spot in your own tooling. If your KEV or advisory feed is filtered by vendor, the three CVEs in this chain never appear, because the catalogue files them under PHP Group and Linux Kernel rather than Palo Alto.

For impact, the campaign's own numbers show the scale: about 19,000 portals scanned, 240 targets narrowed, 25 firewalls rooted across four countries, including at least three US government-affiliated devices, with the tooling and results independently verified by Palo Alto's Unit 42. The full chain runs from one unauthenticated HTTPS request to a persistent root web shell in under 15 minutes.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 15 min read.

What happened, in plain words

A firewall is the box that sits between networks and decides what traffic is allowed through. Most people treat it as the thing that keeps attackers out. In late November 2026, attackers turned that box into their way in.

According to Palo Alto Networks security advisory PAN-SA-2026-0015, confirmed on 25 November 2026, attackers were actively breaking into PAN-OS firewalls in the wild. PAN-OS is the operating system that runs Palo Alto Networks firewalls. The attack combined two separate sets of flaws, and each set has a name:

  • PHP2Shell (CVE-2026-109618 and CVE-2026-109619): two flaws in PHP, the programming language behind the firewall's web management interface. They let an attacker run their own commands on the device without logging in.
  • Fragnesia (CVE-2026-46300): a flaw in the Linux kernel, the core of the operating system underneath. It lets someone who already has a small foothold on the machine become the all-powerful root user.

Neither half is enough on its own. Together they took attackers from a single anonymous web request to full root control of the device in under fifteen minutes, and from there deeper into the network the firewall was supposed to protect.

A few terms before we go further, because they come up constantly:

  • Vulnerability: a mistake in software that lets someone make it do something the maker did not intend, such as run their own commands.
  • Exploit: the actual technique or piece of code that abuses a vulnerability.
  • CVE: a public ID number for a specific vulnerability, like a catalogue number. CVE-2026-109618 is one entry in that catalogue.
  • Root: the administrator account on a Linux machine. Root can do anything: read every file, change every setting, install anything. Getting root is the goal of most attacks on a server.
  • Remote code execution (RCE): a vulnerability that lets an attacker run commands on a machine over the network, from somewhere else entirely.

The setup: what made these firewalls reachable

Every observed attack had the same precondition: a PAN-OS firewall with its management interface exposed directly to the public internet.

The management interface is the administrative side of the firewall, served by a PHP web application.

Palo Alto's own data says 100 percent of the observed exploitation attempts hit internet-facing management interfaces. If yours was reachable from anywhere on the internet, you were in the target set. No credentials were needed for the first stage, because the PHP flaws are unauthenticated: they work without a username or password.

The campaign behind the advisory is documented. Security firm Dream Research traced it to an apparently Chinese, AI-assisted operation that:

  1. Scanned about 19,000 internet-facing PAN-OS management portals.
  2. Narrowed the list to 240 targets.
  3. Rooted 25 firewalls across the United States, Japan, Taiwan and South Korea, including at least three affiliated with the US government.

Palo Alto's Unit 42 team independently verified the tooling and the results.

Both halves of the chain were already on CISA's Known Exploited Vulnerabilities (KEV) catalogue before Palo Alto's advisory. The KEV catalogue is a US government list of vulnerabilities that are known to be exploited in real attacks, not just in theory. PHP2Shell was added on 26 October 2026 and Fragnesia on 28 October. Their federal patch deadlines, 29 October and 31 October, had already passed. On 28 October, CISA had already warned of a targeted campaign using multi-vulnerability exploit chains against enterprise edge appliances; the firewall attacks are that campaign.

How the attack works, step by step

The chain works in two stages, and each stage on its own would not be enough. The first stage gives the attacker a foothold with the weakest possible privileges, not a takeover. The second stage is a local kernel bug that cannot be triggered remotely on its own and needs code already running on the machine, which is exactly what the first stage provides. The full chain, from one unauthenticated HTTPS request to a persistent root web shell, completes in under 15 minutes.

Step 1: PHP2Shell, the way in

CVE-2026-109618 and CVE-2026-109619 are remote code execution flaws in PHP, the language behind the firewall's web management interface. They need no login. An attacker sends crafted HTTP requests to the web server running on the firewall's management interface, and the flaws let them run arbitrary commands as the low-privilege PHP web worker process, the "nobody" user.

Some of those words deserve unpacking:

  • HTTP request: the message your browser sends to a website when you load a page or submit a form. It is just text with a method (such as GET or POST), a path, some headers and sometimes a body.
  • Web server: the program that listens for those requests and answers them.
  • Web worker process: the program that actually runs the website's code. On Linux it often runs under a deliberately limited account, here called "nobody", so that if it is compromised the damage is contained.
  • Low privilege: able to do only a little. The "nobody" user can run the web application but cannot change system settings or read most files.

At this point the attacker is inside the box with the weakest possible privileges: a foothold, not a takeover. Imagine getting into a building through a window but only being able to stand in one corridor.

Step 2: Fragnesia, the climb to root

CVE-2026-46300 is a high-severity Linux kernel vulnerability in the XFRM ESP-in-TCP subsystem, caused by a missing variable initialization, so ESP input processing ends up decrypting shared fragments in place.

That sentence is dense, so let us take it apart:

  • Kernel: the core program of an operating system. It manages memory, files, network traffic and who is allowed to do what. A bug in the kernel is serious because the kernel is what enforces the rules.
  • XFRM ESP-in-TCP: a part of the Linux kernel that handles encrypted network traffic (IPsec). ESP is the encryption part; TCP is the transport. This subsystem processes packets that arrive encrypted.
  • Missing variable initialization: a programming mistake where a value is used before it has been given a proper starting value. It is like reading a form field that was never filled in and acting on whatever happened to be there.
  • Decrypting shared fragments in place: the flawed code writes decrypted data over memory that is shared, instead of into a private copy. That lets one part of the system affect another.

A kernel flaw like this cannot be triggered remotely on its own; it needs code already running on the machine, exactly what PHP2Shell provides. From the compromised web worker process, the attacker triggers Fragnesia and escalates to root, overwriting a system file in the page cache so that switching to root no longer needs a password.

Two more terms:

  • Escalate: move from a limited account to a more powerful one.
  • Page cache: a part of memory where the kernel keeps recently used files so it can read them quickly. Writing to a file there changes what the system sees without touching the disk copy.

So the attacker, still stuck in the corridor, uses a kernel bug to rewrite the rulebook so that the locked door to the safe room opens without a key.

Step 3: Persistence and pivoting

Once they have root, the attackers make it stick. They plant a persistent PHP web shell at:

Text
/unauth/php/change_password.php

Line by line, in plain words:

  • The leading / means this is a path from the top of the filesystem, not a relative path.
  • unauth is a directory name suggesting a part of the site reachable without logging in.
  • php is the directory holding PHP scripts.
  • change_password.php is the file name. It looks like an ordinary password-change page, which is exactly why it is a good hiding place.

A web shell is a small script an attacker uploads to a server so they can send it commands through a normal web request and get the output back in the browser. It is a remote control disguised as a web page. "Persistent" means it survives reboots and keeps working long after the original break-in.

They open reverse SSH tunnels out of the firewall. SSH is the standard way to log in to a Linux machine remotely. A reverse tunnel is a connection the compromised machine makes outward to the attacker, rather than the attacker connecting inward. It is like the intruder installing a private phone line to the outside so they can call in whenever they like, even after the front door is locked.

They then pivot from the firewall into the network behind it. Pivoting means using one compromised machine as a stepping stone to reach others that are not directly reachable from the internet. The firewall sits at the boundary, so it can talk to everything inside. That included password spraying in Active Directory from a service account.

  • Active Directory (AD): Microsoft's directory service. It stores user accounts, groups and permissions for a Windows network, and it is how people log in to company machines.
  • Password spraying: trying one common password against many accounts, rather than many passwords against one account. It avoids lockouts and catches anyone using a weak, shared password.
  • Service account: an account used by software rather than a person, often with broad permissions and a password that is rarely changed.

The device that was supposed to be the boundary becomes the beachhead.

Why it worked: the root cause

PHP2Shell is an unauthenticated remote code execution flaw in the PHP application serving the management interface, which hands the attacker code execution as the low-privilege web worker. Fragnesia is a missing variable initialization in the Linux kernel's XFRM ESP-in-TCP subsystem, which lets ESP input processing decrypt shared fragments in place; it is local-only and needs existing code execution to trigger. Neither half is a takeover alone, and the two together cross the privilege boundary from web worker to root.

First, the management interface was reachable from the internet, which is the exposure every observed attack relied on and which Palo Alto's own long-standing guidance says should never happen.

Second, vendor-filtered vulnerability tracking missed the chain entirely. The KEV catalogue files the flaws under PHP Group and Linux Kernel, so a team that watches the KEV catalogue filtered by the vendors in its own inventory sees none of the three CVEs. The watchlist was correct; the query was wrong. If your vulnerability tracking is filtered by vendor name, you missed this chain entirely.

There is a detail here that should worry every security team, not just Palo Alto customers: not one piece of this chain is Palo Alto code. The entry point is PHP, the escalation is the Linux kernel, and the KEV catalogue files these flaws under their authors, PHP Group and Linux Kernel, not under Palo Alto.

Who is affected and what the impact is

Any organisation running PAN-OS with the management interface reachable from the internet was in the target set; the campaign scanned roughly 19,000 such portals. The 25 confirmed compromises span the United States, Japan, Taiwan and South Korea and include at least three US government-affiliated firewalls. The risk is not limited to the scanned set: any device running an affected PAN-OS build still needs the fix, and restricting exposure does not replace a compromise check if the interface was ever reachable.

On a compromised device the attacker holds root, can plant a persistent PHP web shell, can open reverse SSH tunnels out of the firewall, and can pivot into the network behind it, including password spraying in Active Directory from a service account. The firewall that was meant to be the boundary becomes the beachhead.

The fix

Palo Alto's fix is a PAN-OS upgrade. Fixed builds are listed in PAN-SA-2026-0015 across the 10.2, 11.1, 11.2, 12.1 and 12.2 branches, including:

Branch Fixed build
10.2 10.2.18-h15
11.1 11.1.16-h6
11.2 11.2.16-h3
12.1 12.1.10-h6
12.2 12.2.4-h3

A branch here is a line of software releases, like 11.2, that receives its own updates. A build is one specific release within that line.

One trap: build 12.2.4-h1 fixes PHP2Shell but not Fragnesia, so it does not break the chain. Check the exact build against the advisory list, not just the branch, because a PHP2Shell-fixed build may still predate the Fragnesia fix. Patching only one half leaves the chain intact.

Take the management interface off the internet. This is Palo Alto's long-standing best practice, and every observed attack hit an exposed interface. Allow access only from trusted internal addresses, a jump host, or a VPN.

  • Jump host: a single hardened machine that administrators connect to first, and from which they reach the management interfaces of other devices.
  • VPN: a private, encrypted connection that makes a remote computer appear to be on the internal network.

Hunt before you close the door. Patching removes the vulnerability, not an attacker who already got in. Look for the web shell at /unauth/php/change_password.php, reverse SSH tunnels originating from your firewalls, and password spraying in Active Directory from a service account. If you find any of these, treat the firewall as compromised, rebuild it, and rotate credentials reachable from it.

  • Rotate credentials: change passwords and keys so that anything the attacker copied stops working.

Fix your watchlist, not just your firewall. If your KEV or advisory monitoring is filtered by vendor, add a feed that tracks the open-source components inside your products: PHP, the Linux kernel, and the other libraries your appliances embed.

Things to check in your own environment

  • An API is a way for one program to talk to another over the network, usually returning data rather than a web page.
  • Check whether your KEV or advisory monitoring is filtered by vendor name. A positive result is a query that returns none of CVE-2026-109618, CVE-2026-109619 or CVE-2026-46300 even though the affected product is in your inventory.
  • Check whether a build you believe is fixed actually covers both halves of the chain. A positive result is a build that fixes PHP2Shell but predates the Fragnesia fix, as with 12.2.4-h1.
  • Check for the persistence artefacts on any firewall whose management interface was ever reachable: the web shell path, reverse SSH tunnels originating from the device, and password spraying from a service account in Active Directory.

What to look for when hunting

Recon (reconnaissance) is the attacker's survey phase: finding out what is out there before trying anything.

The second signal is a blind spot in your own tooling. If your KEV or advisory feed is filtered by vendor, the three CVEs in this chain never appear, because the catalogue files them under PHP Group and Linux Kernel rather than Palo Alto.

For impact, the campaign's own numbers show the scale: about 19,000 portals scanned, 240 targets narrowed, 25 firewalls rooted across four countries, including at least three US government-affiliated devices, with the tooling and results independently verified by Palo Alto's Unit 42. The full chain runs from one unauthenticated HTTPS request to a persistent root web shell in under 15 minutes.

The bigger picture

Two lessons run through this attack. First, chains beat single flaws: neither PHP2Shell's low-privilege code execution nor Fragnesia's local-only kernel bug is a takeover on its own, and the federal deadlines for both had already passed before the vendor confirmed the campaign. The window to act was October, and the attacks came anyway.

Second, the perimeter is only as strong as its least-watched component: the firewall fell through code its own vendor did not write, filed under names its customers were not watching, and reached through an interface its own guidance says should never face the internet. Patch to a build that fixes both halves of the chain, pull the management plane off the public internet, and check whether someone already walked through the door.

Glossary

  • Active Directory (AD): Microsoft's directory service that stores user accounts, groups and permissions for a Windows network.
  • API: a way for one program to talk to another over the network, usually returning data rather than a web page.
  • Branch: a line of software releases, such as 11.2, that receives its own updates.
  • Build: one specific release within a software branch.
  • CISA: the US Cybersecurity and Infrastructure Security Agency, which publishes the KEV catalogue and security alerts.
  • CVE: a public ID number for a specific vulnerability.
  • Exploit: the technique or code that abuses a vulnerability.
  • Firewall: the device or software that sits between networks and decides which traffic is allowed through.
  • Foothold: a small amount of access inside a system, not yet full control.
  • Fragnesia: the name given to the Linux kernel flaw CVE-2026-46300 used in this chain.
  • HTTP request: the message a browser or tool sends to a web server to ask for a page or submit data.
  • HTTPS: HTTP carried over an encrypted connection.
  • IPsec / ESP: a set of protocols for encrypting network traffic; ESP is the part that carries the encrypted payload.
  • Jump host: a single hardened machine administrators connect through to reach other devices.
  • KEV catalogue: CISA's list of vulnerabilities known to be exploited in real attacks.
  • Kernel: the core program of an operating system that manages memory, files, networking and permissions.
  • Linux: the open-source operating system kernel that PAN-OS runs on.
  • Low privilege: able to do only a little on a system.
  • Management interface: the administrative web interface where an administrator configures a device.
  • Page cache: memory where the kernel keeps recently used files for speed.
  • PAN-OS: the operating system that runs Palo Alto Networks firewalls.
  • Password spraying: trying one common password against many accounts to avoid lockouts.
  • PHP: a programming language widely used for web applications.
  • PHP2Shell: the name given to the pair of PHP flaws CVE-2026-109618 and CVE-2026-109619 used in this chain.
  • Pivot: use one compromised machine as a stepping stone to reach others.
  • Privilege: what an account is allowed to do on a system.
  • Recon: the attacker's survey phase of finding out what is reachable before attacking.
  • Remote code execution (RCE): a vulnerability that lets an attacker run commands on a machine over the network.
  • Reverse SSH tunnel: a connection the compromised machine makes outward to the attacker, so the attacker can reach back in.
  • Root: the all-powerful administrator account on a Linux machine.
  • Rotate credentials: change passwords and keys so copied ones stop working.
  • Service account: an account used by software rather than a person, often with broad permissions.
  • SSH: the standard protocol for logging in to a Linux machine remotely.
  • Unauthenticated: works without a username or password.
  • Vulnerability: a mistake in software that lets someone make it behave in unintended ways.
  • Web server: the program that listens for HTTP requests and answers them.
  • Web shell: a small script planted on a server that lets an attacker run commands through ordinary web requests.
  • Web worker process: the program that runs a website's code, often under a limited account.
  • XFRM: the part of the Linux kernel that handles encrypted network traffic.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.