NFS2ROOT Is Remotely Exploitable Vulnerability In NFS Server Built Into Linux Kernel

A vulnerability has been identified in the NFS server (nfsd), which is part of the Linux kernel (CVE-2026-99362), which allows you to remotely execute your code with kernel rights without authentication. The vulnerability has been codenamed NFS2ROOT and has a severity level of 9.8 out of 10 (CVSS). The attack is possible on servers using
nfsd kernel module for processing NFSv4.1/4.2 requests and accepting external network connections on TCP port 2049. Vulnerable configurations are found in network attached storage (NAS), file servers, build infrastructures, and Kubernetes storage nodes. The researchers who identified the problem were able to prepare a working exploit that allows you to remotely gain root rights on the server, but the exploit has not yet been published publicly.

To exploit the vulnerability, it is enough to establish one TCP connection to the server. The vulnerability is caused by a buffer overflow in the session slot caching code in the implementation of the NFSv4.1 and 4.2 protocols.
The cache stores the latest server responses so that they can be returned in the event of a repeat request. The cache size is determined by the NFS client. When the client passes 0 to the cache size field, the nfsd4_sequence() function on the server reduces the size of the response buffer to zero, but then attempts to copy the full response to a zero-size buffer. As a result, 61 bytes of data are superimposed on the kernel structures following the buffer, of which 40 bytes (headers and tag) are completely controlled by the attacker.


In the prepared exploit The overflow is used to damage the control structures of an adjacent slot, as a result of which it is possible to leak 3.8 KB of data from kernel memory when processing the next request and determine the memory layout in the kernel to bypass address space randomization. Next, a pointer is substituted into the following structure to initiate the release of the selected object in kernel memory. After which the freed memory is replaced with a fake callback handler, composed of NFS client names, which is activated when the TCP connection to the NFS server is broken.

The problem appears starting from the Linux kernel 3.16 (2014) and removed in releases 6.12.117, 6.18.61, 7.3.2 and 7.4- rc1. The status of vulnerabilities in distributions can be assessed on these pages: Debian, Ubuntu, SUSE/openSUSE, RHEL, Gentoo, Arch

/Reports, release notes, official announcements.