NFS2ROOT (CVE-2026-99362): one connection to port 2049 can get root on a Linux NFS server. How to check yours
NFS2ROOT (CVE-2026-99362) is a heap overflow in nfsd, the NFS server built into the Linux kernel. Anyone who can reach TCP port 2049 can trigger it before logging in, and OpenSec turned it into a root shell on a lab server. It’s rated 9.8. The CVE was published on November 19, and the bug has been in the kernel since 3.16 (2014).
OpenSec’s AI harness found it, and Jérémy Jean of ANSSI found it independently and wrote the upstream fix. OpenSec’s write-up shows the root shell on video and walks through the chain: the overflow, a leak that defeats KASLR, a forged free, then a shell. The exploit itself isn’t public, and I haven’t seen a report of it being used.
It only affects machines that serve NFS from the kernel: file servers, backup targets, NFS datastores for VMware or Proxmox, build and Kubernetes storage nodes. A machine that only mounts NFS shares isn’t affected.
Where the fixes are
The upstream fix, “nfsd: preflight SEQUENCE replies before accepting a slot”, is in 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.61 and 7.3.2.
| Distribution | Status on November 25 |
|---|---|
| Debian 13 (trixie) | Fixed in 6.12.117-1 |
| Debian 12 (bookworm) | The default linux kernel (6.1.192-2) is still vulnerable. The linux-6.12 backport is fixed in 6.12.117-1~deb12u1 (DLA-4927-1) |
| Ubuntu 22.04 and 24.04 | No fixed kernel yet (“needed”) |
| Ubuntu 26.04 | Fix pending in 7.0.0-45.45. The 7.0.0-44 kernel that unattended-upgrades installed on my lab VM today doesn’t have it |
| RHEL 6 to 10 | Affected, no fixed kernel yet. Red Hat rates it Critical |
NoisyTCP went the same way earlier this month, with Debian’s kernels out first.
Check one machine
A server is exposed when all four of these are true. They’re OpenSec’s list.
The running kernel isn’t fixed. Check the distribution’s kernel changelog instead of the version number, since distributions backport fixes into kernels with older-looking versions. On Ubuntu:
zgrep -cE 'CVE-2026-99362|preflight SEQUENCE replies before accepting a slot' /usr/share/doc/linux-modules-$(uname -r)/changelog.Debian.gz
On Debian the changelog is in /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz. On RHEL, Rocky and Alma:
rpm -q --changelog kernel-core-$(uname -r) | grep -cE 'CVE-2026-99362|preflight SEQUENCE replies before accepting a slot'
Anything above 0 means the kernel you’re running has the fix.
The kernel NFS server is running, with NFSv4.1 or 4.2 on.
sudo cat /proc/fs/nfsd/threads /proc/fs/nfsd/versions
A thread count above 0 means it’s serving. The bug needs an NFSv4.1 session, so look for +4.1 or +4.2 in the versions line. Both are on by default: a fresh nfs-kernel-server on Ubuntu 26.04 and a fresh nfs-utils on Rocky 9.8 both showed +3 +4 +4.1 +4.2.
Port 2049 listens on something other than loopback.
ss -ltn 'sport = :2049'
User-space NFS servers like NFS-Ganesha don’t use nfsd, so this bug doesn’t apply to them. OpenSec lists NAS appliances among the machines with 2049 open, so check your vendor’s advisory for Synology, QNAP or TrueNAS boxes.
The stopgaps
For a server you can’t patch and reboot yet, OpenSec gives two.
- Limit port 2049 to the clients that need it, at the host firewall or the network. The clients you allow keep working as before.
- Turn off NFSv4.1 and 4.2. Put this in
/etc/nfs.conf, or in a file of its own under/etc/nfs.conf.d/, and restartnfs-server:
[nfsd]
vers4.1=n
vers4.2=n
NFSv3 and 4.0 keep working. You lose pNFS and the 4.2 features, like server-side copy.
What the second stopgap did to clients in my lab
I set up an NFS server with one export on my Ubuntu 26.04 VM and my Rocky 9.8 VM, and turned 4.1 and 4.2 off with a file in /etc/nfs.conf.d/. That worked on both (nfs-utils 2.8.5 and 2.5.4), and /proc/fs/nfsd/versions showed -4.1 -4.2 after the restart.
On the client side:
- A new mount with
vers=4.1failed withProtocol not supported. - A mount with no version set came up as 4.0 on its own.
- A share that was already mounted with 4.1 broke. Right after the restart,
lson it returnedStale file handle, and it stayed at 4.1. It has to be unmounted and mounted again.
Before you turn 4.1 off on a server, find out what’s mounted from it and plan the remounts. I didn’t try to exploit either VM, and OpenSec’s exploit isn’t public.
Hunting for it
OpenSec notes that the attack is ordinary NFS traffic, so there’s no network signature. Their list: kernel warnings from nfsd4_check_resp_size (on every attempt, successful or not), oopses with nfsd4_ or svc_ frames, shells started by kernel workers on a file server, and bursts of short NFSv4.1 sessions from one address.
sudo journalctl -k | grep -E 'nfsd4_check_resp_size|nfsd4_'
Doing it with RFF
The RFF Script Library has two new Linux entries. NFS2ROOT (CVE-2026-99362) - NFS Server Exposure Check (Linux) checks all four conditions above and reports EXPOSED only for servers that meet all four, so a fleet-wide run flags the NFS servers instead of every Linux box with an old kernel. It also says when a fixed kernel is installed but not running yet. NFS2ROOT stopgap: turn off NFSv4.1 and 4.2 (Linux) writes the /etc/nfs.conf.d file, restarts the server, checks that 4.1 and 4.2 are off, and can be undone. I ran both through RFF on the two lab VMs: the check said EXPOSED on both, the stopgap turned 4.1 and 4.2 off, and the check then reported them off.
Start free and you can run the NFS2ROOT check on every Linux server at once.
RFF is free for your first 100 endpoints: getrff.com.
Sources
- OpenSec: NFS2ROOT (the root shell, the exploit chain, the four conditions, both stopgaps, what to hunt for)
- CVE-2026-99362 record (the kernel’s description, the KASAN report, fixed versions, introduced in 3.16, CVSS 9.8)
- Debian security tracker: CVE-2026-99362 (trixie fixed, bookworm’s default kernel vulnerable, DLA-4927-1 for linux-6.12)
- Ubuntu: CVE-2026-99362 (22.04 and 24.04 needed, 26.04 pending in 7.0.0-45.45, priority critical)
- Red Hat: CVE-2026-99362 (Critical, RHEL 6 to 10 affected)
- Upstream fix (nfsd: preflight SEQUENCE replies before accepting a slot)
Comments
Comments use GitHub Discussions, so you'll need a GitHub account to post. Corrections are especially welcome.