Fragnesia (CVE-2026-46300): May's Linux kernel bug is now finishing off PHP2Shell attacks with root
CISA has added Fragnesia, a Linux kernel flaw patched back in May, to its list of exploited vulnerabilities: attackers chain it with PHP2Shell to go from running code as the web user to full root, and they've taken 25 servers that way. What happened, how to tell if you're affected and what to do today.
When a "local" bug stops being minor
A week ago we covered how to patch PHP2Shell, the two critical PHP flaws that let anyone run code on a server without logging in. We warned back then that the gap between "the patch is out" and "it's being used against you" was measured in hours.
Now we know what attackers do once they're in. On 28 October, the US Cybersecurity and Infrastructure Security Agency (CISA) added a Linux kernel flaw called Fragnesia (CVE-2026-46300) to its Known Exploited Vulnerabilities (KEV) catalogue, and explained why: it's being used together with PHP2Shell to turn access as the web user into full root access.
Let's be upfront about one thing: Fragnesia isn't new. It was disclosed in mid-May and the distributions have shipped fixes since then. What's new is that it's no longer a lab exercise: real attacks are using it. And that changes the priority of any server that hasn't been rebooted in months.
In a nutshell
- Fragnesia (CVE-2026-46300, CVSS 7.8) lets any unprivileged user on a Linux server become root. It affects kernels released before 13 May 2026, and exploit code is public.
- Chained with PHP2Shell, an attacker goes from an unauthenticated web request to root in under 15 minutes.
- What to do: patch PHP and the kernel, reboot (the new kernel isn't used until you do) and, if you can't today, block the
esp4andesp6modules.
What exactly is broken
Fragnesia belongs to the same family as Dirty Frag, disclosed in early May, and DirtyClone, which we wrote about in July. They all abuse the page cache: the in-memory copy of files that the kernel keeps so it doesn't have to read them from disk every time.
This time the bug lives in the part of the kernel that handles IPsec carried over TCP (the XFRM ESP-in-TCP subsystem). When it merges pieces of network packets, one kernel function (skb_try_coalesce()) drops a flag that says "this piece is shared, don't touch it". Without that flag, the kernel decrypts data on top of a page that actually belongs to a file.
The upshot is that an ordinary user can modify, in memory, files they should only be able to read, such as /usr/bin/su. The file on disk doesn't change, but the system uses the copy in memory. The public proof of concept does exactly that: it tampers with su in the cache and gets a root shell.
The attack that came to light this week
It was investigated by the Israeli company Dream and independently confirmed by Palo Alto Networks' Unit 42. According to what has been published:
- Getting in with PHP2Shell. A handful of crafted HTTP requests corrupt PHP's memory, leak the address where PHP is loaded and end up running commands. At this point the attacker is the user the website runs as (
nobody,www-data…), with no rights to touch anything important. - Escalating with Fragnesia. With that foothold as an ordinary user, they run Fragnesia and become root.
- Staying put. They drop a persistent webshell into a publicly reachable directory.
The whole chain, from the first unauthenticated HTTPS connection to a root webshell, takes less than 15 minutes.
The first targets were firewalls with PHP built in (PAN-OS, running PHP 8.0.30) belonging to organisations in the US, Japan, Taiwan and South Korea, several of them linked to the US government. From there the attackers tunnelled into the internal network, compromised more machines the same way and went after the company's user directory (Active Directory). In total, 25 servers rooted between 23 and 25 October.
And it's not just firewalls: a Perplexity engineer has confirmed PHP2Shell attempts against an Apache server with mod_php and PHP 8.4.26, in other words a perfectly ordinary setup that was a single release away from being patched.
Why this matters even if you don't run one of those firewalls
The lesson isn't about one particular vendor. It's about something we see a lot on real servers: "local" kernel bugs get put off until later. The reasoning usually goes, "you'd need an account on the server to exploit it, and nobody gets in here".
This attack shows the problem with that reasoning: the web user counts as a local user. As soon as a bug in PHP, a WordPress plugin or any application lets someone run code, the attacker is already inside with an unprivileged account. From there, an unpatched kernel is the only thing standing between them and root.
And with root we're no longer talking about a website with one file changed: we're talking about reading every database, every key and every stored password, installing whatever they like and using the server as a stepping stone into the rest of your network.
How to tell if you're affected
1. Check which kernel is actually running
uname -r
Watch out here: what matters is the kernel that's running, not the one that's installed. If you updated in June but haven't rebooted since April, you're still on the vulnerable kernel. On Debian and Ubuntu, if /var/run/reboot-required exists, the system is telling you a reboot is pending.
Fixed versions on the most common distributions:
| Distribution | Fixed kernel package |
|---|---|
| Ubuntu 26.04 LTS | 7.0.0-22.22 |
| Ubuntu 24.04 LTS | 6.8.0-124.124 |
| Ubuntu 22.04 LTS | 5.15.0-181.191 |
| Debian 13 (trixie) | 6.12.90-1 or later (DSA-6295-1) |
| Debian 12 (bookworm) | 6.1.174-1 or later (DSA-6306-1) |
| RHEL 8, 9 and 10 | fix released; check the erratum for your version |
According to Canonical, Ubuntu 20.04 and earlier aren't affected. Cloud provider kernels (AWS, Azure, Google Cloud) have their own version numbers: look yours up in your distribution's advisory.
2. Check whether the IPsec modules are loaded
lsmod | grep -E 'esp4|esp6'
If nothing comes back, don't relax just yet: not being loaded right now doesn't mean they can't be loaded. The kernel usually loads these modules on demand when a program asks for them, and that includes the attacker's program. That's why the mitigation below blocks them rather than just unloading them.
3. Go back over PHP
If the kernel is up to date but PHP isn't, the attacker won't reach root, but they will get in. Make sure you're on PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or your distribution's fixed package, with the processes restarted. It's all laid out step by step in our PHP2Shell article.
What to do today
Update the kernel and reboot
# Debian / Ubuntu
sudo apt update && sudo apt full-upgrade
sudo reboot
# RHEL / AlmaLinux / Rocky
sudo dnf update kernel
sudo reboot
After the reboot, run uname -r again and compare it with the table. If you haven't checked it, it isn't done.
If you use Docker, remember that containers share the host's kernel: updating your images won't fix this. You need to update and reboot the machine itself.
If you can't reboot today
Red Hat suggests two temporary mitigations. Neither replaces the patch.
Option 1: block the esp4 and esp6 modules. This is the most direct one:
printf 'install esp4 /bin/false\ninstall esp6 /bin/false\n' | sudo tee /etc/modprobe.d/fragnesia.conf
sudo rmmod esp4 esp6 2>/dev/null; true
The cost: IPsec stops working. If the server runs IPsec VPN tunnels (strongSwan, Libreswan…), don't use this option or they'll drop at the next reboot. To undo it, delete /etc/modprobe.d/fragnesia.conf.
Option 2: disable unprivileged user namespaces, if you need IPsec to keep working:
echo "user.max_user_namespaces=0" | sudo tee /etc/sysctl.d/fragnesia.conf
sudo sysctl --system
The cost: it breaks rootless containers (rootless Podman or Docker), sandboxing in some browsers, and Flatpak. On a typical web server it rarely gets in the way, but check before you apply it.
If you think you've already been hit
If your server had unpatched PHP exposed to the internet at any point since 20 October, it's worth taking a careful look:
- Web processes spawning odd things:
php-fpm,apache2orhttpdrunning a shell,curlorwget. - New or modified PHP files in your web folders that you didn't upload.
- New users, SSH keys or scheduled tasks (cron), especially for root.
- Persistent outbound connections you don't recognise: in this attack they left a tunnel open to the outside.
One important detail about this family of bugs: the tampering happens in memory, not on disk. A file integrity check won't spot anything and, after a reboot, the trace is gone. What remains are the consequences: the webshell, the new users or the tunnel.
If you find any of those signs, treat the server as compromised: isolate it, keep the logs and don't stop at deleting the webshell. With root, the attacker may have left other doors open.
What we do
On the servers we look after, the kernel gets updated along with the rest of the system, but the reboot is what tends to get left hanging, because it means downtime. So we keep track of which machines have a new kernel installed but not yet running, and we schedule reboots for quiet hours instead of leaving them "for whenever we can".
The other piece is the usual one: inventory. Knowing which PHP and kernel version runs on each machine, what has PHP inside it even when it doesn't look like it (control panels, appliances, third-party images) and which servers use IPsec. With that in hand, a week like this one comes down to a to-do list rather than an afternoon of nerves.
If you're not sure which kernel your servers are running, or they haven't been rebooted in months and you're wary of doing it, let's talk.
References
- CISA warns of Fragnesia Linux flaw chained in PHP2Shell attacks — BleepingComputer (29 Oct 2026)
- Suspected Chinese attackers built a custom PHP2Shell exploit and rooted 25 servers — The Register (29 Oct 2026)
- PHP2Shell Attack Roots 25 Servers, Breaches U.S. Government-Affiliated Network — The Hacker News
- Known Exploited Vulnerabilities Catalog — CISA
- New Fragnesia Linux flaw lets attackers gain root privileges — BleepingComputer (May 2026)
- RHSB-2026-003: Dirty Frag and Fragnesia — Red Hat
- CVE-2026-46300 — Red Hat Customer Portal
- CVE-2026-46300 — Ubuntu Security
- CVE-2026-46300 — Debian Security Tracker
- Linux Kernel bug Fragnesia allows local root access attacks — Security Affairs
Want to talk about your case?
Tell us what you need and we will get back to you within 24 hours with a clear proposal.
Get a quote