NFS2ROOT: A 12-Year-Old Linux Kernel Flaw Lets Attackers Take Root Without Logging In

A critical heap overflow in the Linux kernel's NFS server, tracked as CVE-2026-99362 and dubbed NFS2ROOT, lets a remote attacker with no account and no login gain root on any server exposing NFSv4.1 or NFSv4.2 on TCP port 2049. The bug has been present since Linux 3.16 in 2014. Fixed kernels are available — patching and rebooting is the only complete fix.

Nov 28, 2026 - 00:01
Nov 28, 2026 - 00:02
 0  4
NFS2ROOT: A 12-Year-Old Linux Kernel Flaw Lets Attackers Take Root Without Logging In
A long, brightly lit aisle in a data center, lined on both sides with white perforated server racks.

NFS2ROOT: A 12-Year-Old Linux Kernel Flaw Lets Attackers Take Root Without Logging In

For twelve years, a flaw sat quietly inside the Linux kernel's file-sharing server, waiting for anyone who knew where to look. That flaw now has a name — NFS2ROOT — and a severity score to match: 9.8 out of 10. A single network connection to port 2049, no username, no password and no mounted share, is enough for an attacker to corrupt kernel memory and walk away with a root shell.

The vulnerability, tracked as CVE-2026-99362, was published by the Linux kernel's CVE team on 19 November 2026, and cybersecurity firm OpenSec disclosed it publicly on 26 November with a video showing the full attack working end to end. There is no public exploit code and no reported exploitation in the wild so far — but the fix is already available, and administrators running an NFS server should treat this as a patch-now problem.

What NFS2ROOT is

NFS2ROOT is a heap overflow in nfsd, the NFS server built into the Linux kernel. It lives in the handling of the NFSv4.1 SEQUENCE operation, the first step a client takes when it opens a session with the server.

Each NFSv4.1 session keeps a small cache of its last reply, so a retried request can be answered exactly once. The client itself decides how large that cache is — and the flaw lets a client shrink it to zero bytes. When the server then processes the session, it narrows its reply buffer to that zero-byte limit before it has accepted the session's sequence number, and then copies a full reply — headers and all — into a buffer with room for nothing.

The result is an out-of-bounds write of about 80 bytes into the kernel heap, 61 bytes past the end of the allocated object, with roughly 40 of those bytes chosen by the attacker. Because the NFS server runs inside the kernel and parses network input before it knows who the client is, the whole thing happens before any authentication takes place.

From a memory bug to a root shell

A heap overflow on its own often ends in a crash. What makes NFS2ROOT dangerous is that the same bug also leaks information. OpenSec demonstrated the full chain in its lab, using only ordinary NFS requests sent to port 2049:

First, the overflow corrupts the bookkeeping of a neighbouring session slot. A replay request then returns about 3.8 kilobytes of kernel heap memory, and with it the address randomisation offset that normally hides where the kernel is loaded. A forged pointer makes the kernel free an object of the attacker's choosing, and that memory is reclaimed with a fake callback structure assembled from NFS client names. When the attacker hangs up the connection, nfsd calls the fake callback — and the kernel runs the attacker's command as root.

In OpenSec's recording, the victim's console prints root, then uid=0(root), and then powers itself off, all from a client that only ever talked to port 2049. The exploit code itself stays private.

Twelve years old, found twice

The vulnerable code dates back to a commit from March 2014 that shipped in Linux 3.16. Every kernel since then has carried it — long-term support branches, distribution kernels and appliance kernels alike.

The bug was found independently by two parties. Jérémy Jean of the French cybersecurity agency ANSSI spotted it and sent a fix upstream on 17 August 2026, together with a kernel memory-safety report. OpenSec's automated research system, Antara, flagged the same code path on 21 September, scored it 9.8 and built the full remote-root chain on its own. OpenSec reported the bug to the NFS maintainers and the kernel security team on 22 September, with the working exploit and a patch.

Who is affected

A server is exposed when all of these are true: it runs a Linux kernel older than the fixed releases, the in-kernel NFS server is loaded and serving NFSv4.1 or NFSv4.2, and TCP port 2049 is reachable from a network the server does not fully trust. NFSv3 and NFSv4.0 are not affected, and systems that do not run an NFS server at all are not exposed.

That combination is common. Port 2049 sits open on file servers, NAS appliances, build farms and Kubernetes storage nodes, and NFSv4.1 and 4.2 are the default on current distributions. The Linux kernel CNA rates the flaw CVSS 3.1 9.8 Critical, with a vector of network access, low complexity, no privileges required and no user interaction.

Fixed kernel versions

Upstream fixes are available in 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.61, 7.3.2 and 7.4-rc1. Distribution kernels carry their own version numbers, so administrators should install the update that explicitly names CVE-2026-99362 and then reboot — the patched kernel only takes effect after a restart.

Distribution coverage is still uneven. Debian's trixie release carries the fixed 6.12.117 kernel, while its bookworm default 6.1 kernel was still vulnerable as of 26 November, according to KernelScan. Ubuntu had listed its main kernels as vulnerable with fixes in progress. Administrators should check their vendor's advisory rather than relying on the upstream version number alone.

What to do now

The advice from OpenSec and the kernel security community is straightforward: update the kernel on every NFS server and reboot. Kernel hardening does not remove the overflow, and there is no configuration change that fully substitutes for the patch.

For servers that cannot be patched immediately, three workarounds reduce the exposure. Restrict TCP port 2049 at the firewall so only the clients that genuinely need NFS can reach it. Or turn off NFSv4.1 and NFSv4.2 in the nfsd section of the system NFS configuration file and restart the NFS server, which leaves NFSv4.0 and NFSv3 working. And if a system does not need file sharing at all, stop and disable the NFS server service.

Because the attack is made of valid NFS traffic, it leaves almost no network signature. The signs to watch for are kernel warnings from the NFS reply-size check, kernel crash reports mentioning NFS or service routines, shells spawned by kernel worker processes on a file server, and bursts of short NFSv4.1 sessions from a single source.

As of 26 November, there are no reports of NFS2ROOT being exploited in the wild, and it has not been added to CISA's catalogue of known exploited vulnerabilities. That is the good news. The bad news is that the bug survived twelve years of kernel releases unnoticed, and the window between public disclosure and the first real-world attack is rarely a long one.

Sources

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0