Kernel heap buffer overflow vulnerability
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. This flaw, which OpenSec dubbed NFS2ROOT, stems from a heap buffer overflow in the Linux NFS server (nfsd) and has existed since the release of Linux kernel version 3.16 in March 2014. ANSSI’s Jeremy Jean discovered the flaw and submitted a fix in August, while OpenSec shared a full remote-root exploit and a patch with the NFSD maintainers in late September. Successful exploitation allows remote threat actors without privileges to corrupt kernel memory and gain root access to vulnerable Linux servers exposed online through low-complexity attacks that do not require any user interaction. Attackers exploit the flaw by sending malicious requests that cause the NFS server to write data beyond an allocated memory buffer, letting them read kernel memory and bypass KASLR. They then place a callback that executes a command in a released memory area once the attacker closes the connection. When the attacker closes the connection, the kernel executes the embedded command with root privileges, providing full control of the unpatched server.
Mitigation and technical specifications
The vulnerability affects systems where nfsd version 4.1 or 4.2 is running and TCP port 2049 is reachable over the Internet. This applies to Linux kernels older than 6.12.117, 6.18.61, 7.3.2, or 7.4-rc1.
| Vulnerability Spec | Details |
|---|---|
| CVE Identifier | CVE-2026-99362 |
| Target NFS Versions | 4.1 or 4.2 |
| Target Port | TCP 2049 |
| Earliest Vulnerable Kernel | 3.16 |
Security teams should apply the latest kernel security updates from their Linux distribution vendor and reboot the system. If a patch cannot be applied immediately, admins should restrict access to TCP port 2049 to trusted clients or networks. They can also 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. Security teams can monitor for signs of exploitation by checking for kernel warnings from nfsd4_check_respsize, 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. NFS2ROOT follows a series of Linux privilege escalation flaws disclosed this year, including RefluXFS, CIFSwitch, Dirty Frag, Fragnesia, PinTheft, Copy Fail, Pack2TheRoot, and DirtyDecrypt/DirtyCBC.
