A 12-year-old heap buffer overflow in the Linux kernel’s NFS server lets remote attackers take root without logging in. The NFS2ROOT Linux flaw, tracked as CVE-2026-99362, has been in the kernel since version 3.16, released in March 2014. Nobody has reported attacks in the wild yet, but a full exploit exists and fixed kernels are available.
How the bug was found
Jérémy Jean of the French agency ANSSI found the problem and submitted a fix in August. Security firm OpenSec later gave it the NFS2ROOT name. In late September it passed the NFSD maintainers a complete remote-root exploit along with a patch.

What the exploit does
The weakness sits in nfsd, the kernel’s NFS server. Specially built requests push the server into writing beyond the end of a buffer it allocated. The attacker can then both corrupt and read kernel memory, which is enough to defeat KASLR, the feature that randomizes where kernel code is placed.
Next, a callback carrying a command is planted in memory the kernel has already freed. Once the attacker drops the NFS connection, the kernel executes that command as root.
Exploitation is simple, needs no account on the target, and doesn’t depend on anyone clicking anything.
Put simply, one unauthenticated network connection to a vulnerable server is enough to start the attack, and the attacker ends with full control of the machine. That makes the bug far more serious than the typical local privilege escalation, where an intruder must already have a foothold.
Which servers are exposed
A system is vulnerable when all of these are true:
- Its kernel predates 6.12.117, 6.18.61, 7.3.2 and 7.4-rc1.
- The nfsd service is active and speaks NFS version 4.1 or 4.2.
- The internet can reach TCP port 2049 on the host.
That last condition matters because of where NFS tends to live. Port 2049 is commonly open on file servers, NAS appliances, build farms and Kubernetes storage nodes, and the kernel behind it has accepted writes into its memory from anyone who can connect. OpenSec’s advice is to patch every host, since kernel hardening does not remove the overflow.
How to protect your servers
The fix is a kernel update from your Linux distribution. Install it and restart the machine, since the old kernel keeps running until then.
If you can’t patch right away, there are two stopgaps:
- Allow TCP port 2049 only from trusted clients and networks.
- If the machine doesn’t need NFS sharing, stop and disable the nfs-server service.
Neither step replaces the kernel update, so treat them as a short-term measure only. The first option keeps NFS working for the people who need it. The second removes the attack surface completely.
Signs someone is probing a server
Traffic-based detection won’t help here, because the NFS2ROOT Linux flaw leaves no network signature. Host-level traces are the better bet:
- Warnings logged by the kernel from nfsd4_check_resp_size.
- A shell started by a kernel worker thread on a file server.
- One address opening many brief NFSv4.1 sessions in quick succession.
- Kernel crash traces containing nfsd4_*, svc_* or call_usermodehelper* functions.
Any of these on a machine running an unpatched kernel deserves an immediate look.
Another Linux root bug in a busy year
NFS2ROOT is the newest of many Linux privilege escalation bugs patched this year. Others this year include RefluXFS, CIFSwitch, Dirty Frag, Fragnesia, PinTheft, Copy Fail, Pack2TheRoot and DirtyDecrypt/DirtyCBC.
Most of those need a local foothold first. This one doesn’t. A server that exposes NFS to the internet is reachable by anyone who can open a connection to it, so those machines should be at the front of the patching queue. Teams should also check the kernel version on build farms and storage nodes, since those often run longer between updates than the main application servers.
With the fixed releases now out, the remaining work is on administrators: find every host that runs nfsd, confirm the kernel version, update, and restart.
Source: BleepingComputer