Linux NFS2ROOT Vulnerability: Critical Flaw Allows Root Privilege Escalation
A critical vulnerability in the Linux kernel’s Network File System server, designated CVE-2026-99362, has been identified that permits unauthenticated remote attackers to obtain root privileges.
NFS2ROOT Vulnerability Details
The issue, which has persisted for 12 years, was discovered by J r my Jean of ANSSI, who submitted a remedy in August. OpenSec, a cybersecurity firm, has named the flaw NFS2ROOT and provided a complete remote-root exploit along with a patch to the NFSD maintainers by late September.
Vulnerability Impact
The vulnerability traces back to Linux kernel version 3.16, released in March 2014, and originates from a heap buffer overflow within the Linux NFS server (nfsd). Systems running a kernel older than 6.12.117, 6.18.61, 7.3.2, or 7.4-rc1 are at risk if nfsd (versions 4.1 or 4.2) is active and TCP port 2049 is accessible from the internet. Successful exploitation enables unprivileged remote actors to corrupt kernel memory and achieve root access through low-complexity attacks that do not require user interaction.
Attack Mechanism
The NFS2ROOT attack sequence involves sending maliciously crafted requests to the NFS server, causing it to write data outside the bounds of an allocated memory buffer. This allows attackers to read kernel memory, circumvent KASLR (Kernel Address Space Layout Randomization), and implant a callback that executes a command in a freed memory region. Upon closing the NFS connection, the kernel executes the embedded command with elevated privileges, granting the attacker root control over the compromised server.
Mitigation Recommendations
Although there are no documented instances of CVE-2026-99362 being actively exploited in the wild, security personnel are urged to immediately apply the latest kernel security updates from their Linux distribution vendor and reboot the system to ensure the patched kernel is active. Organizations unable to patch immediately should restrict access to the NFS server on TCP port 2049 to trusted clients or networks. Furthermore, if NFS functionality is not required, administrators can stop and disable the nfs-server service in /etc/nfs.conf.
Expert Analysis
OpenSec emphasized that port 2049 is exposed on file servers, NAS appliances, build farms, and Kubernetes storage nodes, and since 2014, the Linux kernel listening on this port has permitted anyone who can reach it to write into kernel memory without authentication. They stated that kernel hardening does not resolve the overflow and that every host must be patched.
Detection Methods
While NFS2ROOT attacks lack network signatures, security teams can monitor for potential exploitation indicators by looking for kernel warnings from nfsd4_check_resp_size, shells spawned by kernel workers on file servers, bursts of short NFSv4.1 sessions originating from a single source, and kernel oopses involving nfsd4_*, svc_*, or call_usermodehelper* frames.
Context in Linux Vulnerabilities
NFS2ROOT is the most recent in a continuing series of Linux privilege escalation vulnerabilities disclosed and patched since the beginning of the year, including RefluXFS, CIFSwitch, Dirty Frag, Fragnesia, PinTheft, Copy Fail, Pack2TheRoot, and DirtyDecrypt/DirtyCBC.
