← Back to the blog

// blog · Vulnerability analysis / Linux and kernel

Fragnesia: a Linux kernel local root that completes the PHP2Shell chain

Fragnesia is a Linux kernel flaw that does not look spectacular on its own. It is tracked as CVE-2026-46300 and rated 7.8 on CVSS, which is high but not critical. It cannot be used remotely. The attacker already has to be on the machine as an ordinary, unprivileged user. So why did it reach the CISA list, and why do we cover it separately? Because it is the missing second step. It is chained with PHP2Shell to turn a web shell running as www-data into full root.

This is a good example of how a medium local flaw changes meaning once it becomes a link in a chain. On its own it scores 7.8. Paired with a critical application RCE it yields a full machine takeover with no user interaction.

Context and legality. This is educational material based on analysis by Rescana, the CISA KEV warning and reports of a campaign described by Dream Research and verified by Unit 42. Public exploit code exists, but we do not publish or link it. We describe the mechanism at the level needed to assess risk and patch. Testing systems you do not own is legal only with the owner's written authorisation.

What the flaw is

The bug sits in the XFRM subsystem, specifically the ESP-in-TCP path, the handling of IPsec ESP tunnelled over TCP. When the kernel coalesces TCP buffers in the skb_try_coalesce function, pages that come from the file page cache can lose their shared-fragment marker. ESP then decrypts data in place, overwriting that memory. As a result an unprivileged user can write a few controlled bytes into the page cache of a read-only file.

The interesting part is what happens next. The change stays in memory, the on-disk file is untouched. If this path is used to alter the cached contents of a privileged program, the next execution from that page makes the kernel run the attacker's code with root rights. There is no classic binary overwrite and no race condition, which researchers say makes the attack unusually reliable.

This is an example of a broader class of attacks on the file page cache. The kernel keeps the contents of frequently used binaries there so it does not have to read them from disk on every run. If an attacker can change that in-memory copy without touching the file on disk, they bypass most integrity controls, which look at the disk. The absence of a race and the lack of any need to know kernel addresses make the exploit repeatable, and for an attacker that is the difference between a trick and a reliable tool.

Diagram: a local foothold as an unprivileged user, the flaw in the XFRM ESP-in-TCP path, a write into read-only files in memory, execution from a privileged program and root as the result
//The local escalation chain at a high level. The starting point is an ordinary account or a web shell

Why it is dangerous despite local access

The local access requirement sounds reassuring only until you recall what a typical web server takeover looks like. Remote code execution in an application gives the attacker the web server process rights, usually www-data. That is exactly the local, unprivileged access Fragnesia needs. CISA described how both PHP2Shell flaws are chained with CVE-2026-46300 precisely to complete the path to root. The campaign was reported by Dream Research, and Unit 42 confirmed the findings.

In other words, three flaws combine into one path from an unauthenticated network request to root on the server. We break down the first step in our PHP2Shell analysis. That is why patching PHP alone does not close the matter while the kernel stays vulnerable.

For a team defending a server, the key takeaway is this. If you patch only the application and PHP and leave the kernel for later, you close the first step but the second half of the chain still waits. The reverse is true too. A kernel patch alone, without a current application layer, does not help if the attacker gets a web shell by another route anyway. That is why we plan these two tasks together, in one maintenance window.

How to detect it

Fragnesia is hard to catch with classic methods, because the change stays in memory and the file on disk does not change. A file integrity scan alone may therefore show nothing. It makes more sense to watch behaviour. Unexpected processes running as root, unusual activity around the espintcp module where you do not use IPsec over TCP, and signs of escalation right after a web server account is compromised are signals worth correlating. Detecting the first step, the web shell, is valuable too, because without a local foothold this attack does not start.

Which kernels are affected and what to install

The bug appeared in Linux 3.9, so by age it covers almost every system in use today. In practice the public exploits need the espintcp module, which entered the kernel in 5.6, which narrows the real surface a little. The fixed stable versions are 5.10.257, 5.15.208, 6.1.174, 6.6.141, 6.12.91, 6.18.33, 7.0.10 and 7.1. Distributions shipped patches between mid-May and July 2026, for example RHEL 8, 9 and 10 received them on 20 May. Check the kernel package version in your distribution, and remember that while the old kernel is running the flaw is present. After the update a reboot is required.

A curious point is that the bug lived in the kernel since version 3.9, yet the systems really at risk are mainly those with the espintcp module, which only appeared in 5.6. That is a good reminder that the age of a flaw and its real surface are two different things. For a defender it means it is worth knowing whether espintcp is used at all in your environment, because that decides how urgent the patch is relative to other tasks.

How to defend

Diagram: update the kernel and reboot, limit the espintcp module where it is unused, treat web RCE as local access, monitor privileged binaries, and segment with least privilege
//Five defence priorities. The kernel patch is central, but cutting off the first step counts too
  1. Update the kernel and reboot. The fixes are in 5.10.257, 5.15.208, 6.1.174, 6.6.141, 6.12.91, 6.18.33, 7.0.10 and 7.1. A running old kernel stays vulnerable, so the reboot is part of the patch.
  2. If you cannot patch, limit espintcp. The public exploits rely on that module. Where you do not use IPsec over TCP, restricting or disabling it is a reasonable stopgap.
  3. Treat web RCE as local access. A web shell as www-data is the first step of the chain. Current PHP and application libraries mean that step never happens.
  4. Watch privileged binaries. File integrity monitoring and alerts on unexpected root processes and setuid activity help catch the moment of escalation.
  5. Segment and cut privileges. Separate internet-facing workloads so that one compromised host does not mean the whole estate.

What this means

Fragnesia is a lesson in thinking in chains rather than single CVSS scores. A flaw rated 7.8 combined with a critical RCE produces a critical outcome. Defence in depth is exactly about breaking the chain at any link, not hoping one of them turns out harmless. The cheapest link to cut is usually the first one, keeping a web shell off the server in the first place. For NIS2 this is part of the vulnerability and patch management measures in Article 21, where reaction time and the reboot after a kernel patch also matter.

We gathered the full picture of this month, with CVE numbers and references, in our review of hot CVEs. We cover the requirements on the NIS2 / KSC page. If you want to check whether such a chain, from application to root, can be built on your servers, that is the scope of our penetration testing. Book a consultation.


Sources: Rescana · Ampcus Cyber · CISA KEV

← Back to the blog