A 12-year-old vulnerability in the Linux kernel’s NFS server allows remote attackers to gain root privileges.
The vulnerability is registered as CVE-2026-99362 and has a CVSS score of 9.8. It has existed since Linux kernel version 3.16, which was released in 2014.
NFS2ROOT affects systems running a Linux kernel older than 6.12.117, 6.18.61, 7.3.2, or 7.4-rc1, provided that the NFS server (version 4.1 or 4.2) is active and listening on TCP port 2049. Exploitation is also possible via an internal network.
In a successful attack, attackers without access privileges can manipulate kernel memory and gain root access to vulnerable Linux servers, according to BleepingComputer. Such attacks do not require user interaction.
In NFS2ROOT attacks, attackers exploit the vulnerability by sending specially crafted requests. This causes the NFS server to write data beyond the boundaries of an allocated memory buffer. This allows attackers to read the kernel memory and place a “callback” that executes a command in a freed memory region.
When the attacker terminates the NFS connection, the kernel executes the embedded command with root privileges. This gives the attacker full control over the unpatched Linux server.
No reports of exploitation
There have reportedly been no reports of CVE-2026-99362 being exploited in the wild. Nevertheless, security teams are advised to immediately install the latest kernel security updates from their Linux distribution vendor. After installation, the system must be rebooted to ensure that the patched kernel is active.
If applying a patch immediately is not possible, access to the NFS server via TCP port 2049 should be restricted to trusted clients or networks. Administrators can also disable NFS versions 4.1 and 4.2 via the /etc/nfs.conf file.
“Port 2049 is open on file servers, NAS devices, build environments, and Kubernetes storage nodes. Since 2014, the Linux kernel listening on this port has allowed anyone with access to write to kernel memory, even before logging in,” according to OpenSec. “Kernel hardening does not eliminate the overflow. Apply a patch to every host.”
Although NFS2ROOT attacks are difficult to detect based on network signatures, security teams can still check for possible signs of abuse. OpenSec recommends watching for kernel warnings originating from nfsd4_check_resp_size, shells launched by kernel daemons on a file server, a sudden increase in short NFSv4.1 sessions from a single source, and “kernel oopses” containing frames such as nfsd4_*, svc_*, or call_usermodehelper*.