Linux

​A 12-year-old critical vulnerability in the Linux kernel’s Network File System (NFS) server, tracked as CVE-2026-99362, allows remote attackers to gain root privileges.

Found by ANSSI’s Jérémy Jean (who submitted a fix in August), the flaw has been dubbed NFS2ROOT by cybersecurity firm OpenSec, which shared a full remote-root exploit and a patch with the NFSD maintainers in late September.

The vulnerability has existed since Linux kernel version 3.16 (released in March 2014), and it stems from a heap buffer overflow weakness in the Linux NFS server (nfsd).

image

NFS2ROOT affects systems with a Linux kernel older than 6.12.117, 6.18.61, 7.3.2, or 7.4-rc1 if nfsd (v4.1 or 4.2) is loaded and running and TCP port 2049 is reachable over the Internet.

Successful exploitation lets remote threat actors without privileges corrupt kernel memory and gain root access to vulnerable Linux servers exposed online through low-complexity attacks that don’t require user interaction.

In NFS2ROOT attacks, the threat actors can exploit this flaw by sending maliciously crafted requests that cause the NFS server to write data beyond an allocated memory buffer. This lets them read kernel memory, bypass KASLR (which protects kernel memory addresses), and place a callback that can execute a command in a released memory area.

When the attacker closes the NFS connection, the kernel executes the embedded command with root privileges, allowing the attacker to gain root control of the unpatched Linux server.

NFS2ROOT attack flow
NFS2ROOT attack flow (OpenSec)

​Although there are no reports of CVE-2026-99362 exploitation in the wild, security teams should apply the latest kernel security updates from their Linux distribution vendor immediately to block potential attacks, then reboot the system to ensure the patched kernel is in use.

Those who can’t apply a patch immediately should restrict access to the NFS server over TCP port 2049 to trusted clients or networks. Additionally, if NFS sharing is not required on the system, admins can stop and disable the nfs-server service in /etc/nfs.conf.

“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,” OpenSec said. “Kernel hardening does not remove the overflow. Patch every host.”

While the NFS2ROOT attacks have no network signatures, security teams can still monitor for potential signs of exploitation attempts by checking for 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 kernel oopses with nfsd4_*, svc_* or call_usermodehelper* frames, according to OpenSec.

NFS2ROOT is the latest in a long series of Linux privilege escalation security flaws disclosed and patched since the start of the year, including RefluXFS, CIFSwitch, Dirty Frag, Fragnesia, PinTheft, Copy Fail, Pack2TheRoot, and DirtyDecrypt/DirtyCBC.

article image

Uncover email threats your existing defenses may miss.

Adaptive Security’s AI agents analyze email intent, context, and behavior to uncover phishing, business email compromise, and invoice fraud.

See what’s getting through with a 14-day read-only scan of Microsoft 365 or Google Workspace, with no MX changes.

Start your free email security scan.