NFS2ROOT: 12-year-old nfsd heap overflow in Linux kernel allows remote root
A flaw in the Linux NFS server, tracked as CVE-2026-99362, lets an unauthenticated client on TCP port 2049 write past a slot buffer. Fixes are in stable kernels; nobody has reported exploitation in the wild.
On this page
BleepingComputer reported on November 27 that a heap buffer overflow in the Linux kernel's NFS server (nfsd) can be used by a remote, unauthenticated client to gain root. The bug is tracked as CVE-2026-99362 and has been nicknamed NFS2ROOT by OpenSec, the firm that says it built a working remote-root exploit and handed it, with a patch, to the nfsd maintainers in late September. The reporter credited in the article is ANSSI's Jérémy Jean, who submitted a fix in August.
The flaw has been in the kernel since version 3.16, released in March 2014. That's the twelve years in the headline. No reports of exploitation in the wild have surfaced, and the article says so plainly.
What the kernel commit describes
The upstream fix, "nfsd: preflight SEQUENCE replies before accepting a slot", explains the mechanism at the level of a code review rather than an attack guide. A client can negotiate ca_maxresponsesize_cached down to NFSD_MIN_HDR_SEQ_SZ, which leaves every session slot with a zero-length reply buffer. A COMPOUND request tag can then fill the narrowed buffer so that it holds the SEQUENCE opcode but not the status word after it. The encoder bails out without running the SEQUENCE encoder, cstate.data_offset stays at zero, and the operation status stays at nfs_ok, so the COMPOUND looks like it succeeded.
The reply-cache path declines to store a lone SEQUENCE that returned an error, and that check reads the reported status, which is still success. So the copy starts at offset zero and writes the whole reply, RPC and COMPOUND headers included, into the zero-length slot buffer. The commit includes a KASAN slab-out-of-bounds trace from read_bytes_from_xdr_buf with a write of size 80. The fix checks that the fixed-size SEQUENCE result plus room for a following operation's error status fits the negotiated limit before the buffer is narrowed and the slot seqid consumed.
Exposure
The article says NFS2ROOT affects systems running a kernel older than 6.12.117, 6.18.61, 7.3.2 or 7.4-rc1, with nfsd v4.1 or v4.2 loaded and running and TCP port 2049 reachable over the internet. The CNA record lists a CVSS 3.1 base score of 9.8 with the vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, which matches the no-privileges, no-interaction framing.
OpenSec's exploit chain, as the article describes it, uses the overflow to read kernel memory, defeat KASLR, and plant a callback that runs a command in a freed memory area. Closing the NFS connection triggers execution with root privileges. We haven't seen the exploit and can't speak to how reliable that chain is in practice.
OpenSec's own quote is worth reading closely: "Port 2049 sits open on file servers, NAS appliances, build farms and Kubernetes storage nodes. Since 2014, the Linux kernel listening on it has let anyone who can reach it write into kernel memory before logging in." That's the vendor's characterisation of exposure, not a measured count of vulnerable hosts.
HackZoneLabs assessment
The severity here depends almost entirely on one deployment question: is 2049 reachable from somewhere you don't control? On an NFS server behind a firewall, serving a known client list, this is a patch-and-reboot chore. On a NAS appliance or a storage node with a public address, it's a pre-auth kernel write, and we'd treat it as urgent. The CVSS 9.8 is defensible for the second case and overstated for the first, which is why the score alone shouldn't drive the triage order.
The twelve-year age cuts both ways. It means a lot of long-lived infrastructure is in scope, including appliances whose kernels are years behind and whose vendors ship updates on their own schedule. It also means the bug was reachable for a long time without anyone publishing exploitation, which is mild evidence that opportunistic scanning of 2049 isn't common. That's not reassurance for a host that is exposed; it's a reason not to panic about one that isn't.
We'd also note that the article's detection guidance comes from OpenSec, the same party that wrote the exploit. Kernel warnings from nfsd4_check_resp_size, shells spawned by kernel workers on a file server, bursts of short NFSv4.1 sessions from one source, and oopses with nfsd4_*, svc_* or call_usermodehelper* frames are reasonable things to look for, but they're untested here and the article itself says the attacks have no network signatures. Treat those as leads, not coverage.
What to do first, and what's still open
The article's advice is to apply the latest kernel security updates from your distribution vendor and reboot so the patched kernel is actually running. If you can't patch yet, restrict 2049 to trusted clients or networks, and if NFS sharing isn't needed, stop and disable the nfs-server service.
Unknown: whether any distribution has shipped the fix in its own kernel packages, how many hosts are exposed, and whether the exploit works against every affected branch. The article doesn't say, and we haven't checked. The CVE record's patch status is also unset in the data we have, so the stable-kernel commits are the only fix evidence in front of us.
CVE references
Sources
- New NFS2ROOT Linux flaw can let attackers gain root privilegesPrimarywww.bleepingcomputer.com
If something here is wrong, tell us. Every correction is listed on the corrections page.
Don’t Just Read About Cyberattacks. Learn How They Work.
Go beyond the headlines. Explore hands-on cybersecurity labs, understand real-world vulnerabilities, and build practical security skills with HackZoneLabs.
Start Learning