A 12-Year-Old Hole in Linux File Sharing Can Hand Outsiders Root. Your Questions on NFS2ROOT, Answered
A newly disclosed bug in the Linux kernel’s NFS server, nicknamed NFS2ROOT, can let an attacker who reaches port 2049 take full control of a server without logging in. No attacks have been reported, but a working exploit exists. Here are the answers file server and NAS owners need.
Plenty of small and mid-size businesses keep shared drives on Linux file servers or network-attached storage without ever thinking about the kernel underneath. A flaw disclosed this week is a reason to think about it. BleepingComputer reported the details of NFS2ROOT, a critical bug in the Linux kernel’s Network File System server. The questions below cover what it is and what to do.
What is NFS2ROOT?
It is the nickname security firm OpenSec gave to CVE-2026-99362, a heap buffer overflow in nfsd, the part of the Linux kernel that serves files over NFS. The bug was found by Jérémy Jean of ANSSI, France’s national cybersecurity agency, who submitted a fix in August. OpenSec shared a full remote-root exploit and a patch with the NFSD maintainers in late September.
How old is it?
The vulnerable code has been in the kernel since version 3.16, released in 2014, which makes the bug about 12 years old.
Which systems are exposed?
Systems whose kernel predates the fixed versions (6.12.117, 6.18.61, 7.3.2 or 7.4-rc1) are affected when the NFS server is loaded and running with NFS version 4.1 or 4.2 and TCP port 2049 is reachable. OpenSec points out that this port is open on file servers, NAS appliances, build farms and Kubernetes storage nodes.
What can an attacker do with it?
An attacker with no account sends specially crafted requests that make the NFS server write past the end of a memory buffer. According to the researchers, that lets them read kernel memory, get around KASLR (a protection that hides where kernel code sits in memory) and plant a command in freed memory. When the attacker closes the connection, the kernel runs that command as root, giving full control of the server. The attack requires no user interaction and is described as low in complexity.
Is anyone exploiting it yet?
There are no reports of exploitation in the wild so far. That said, a working exploit has been written, and BleepingComputer lists NFS2ROOT as the latest in a long run of Linux privilege escalation flaws disclosed this year.
Will kernel hardening settings stop it?
Not according to OpenSec, which says hardening does not remove the overflow and that every host needs the patch.
What should administrators do?
- Install the latest kernel security update from your Linux distribution and reboot so the patched kernel is actually running.
- If you cannot patch right away, restrict TCP port 2049 to trusted clients or networks only.
- If a system does not need to share files over NFS, stop and disable the NFS server service.
- Watch for warning signs OpenSec describes: kernel warnings mentioning nfsd4_check_resp_size, shells started by kernel worker processes on a file server, bursts of short NFSv4.1 sessions from a single source, and kernel crashes (“oopses”) involving nfsd4_*, svc_* or call_usermodehelper* functions. The attacks have no network signature, so host-level clues matter.
What this means for your company
Start with an inventory: which of your servers, storage appliances and virtualization hosts run Linux and share files over NFS? NAS boxes are easy to forget because they rarely get logged into, yet many run a Linux kernel and depend on the vendor shipping a firmware update. Check with each vendor, schedule the reboot a kernel patch requires, and confirm port 2049 is never open to the internet. Even inside the office, file sharing should only be reachable from the devices that need it. A storage device that holds every shared document is exactly the kind of system where one missed update becomes a company-wide problem.
If you are not sure which of your storage systems are affected, or need help scheduling updates without disrupting the business, we can sort it out with you. Reach out to Layer 7 Data Solutions to discuss how we’ve helped companies similar to yours.
