Flaw in Linux NFS file sharing exposes servers to remote takeover
Researchers have found a critical flaw in the Linux kernel’s NFS file-sharing server that lets unauthenticated attackers obtain a root shell on affected systems. The flaw remained undetected in the kernel for 12 years, until two researchers, one using an AI agent, discovered it independently.
NFS is typically used inside local networks, including in container networks in Kubernetes clusters and on build servers in development environments. However, it is also enabled on many embedded devices and in network-attached storage (NAS) devices which might be running older kernel versions and can only be patched with firmware updates.
Tracked as CVE-2026-99362 and dubbed NFS2ROOT, the flaw affects systems running the NFSv4.1 or NFSv4.2 versions of the Network File System protocol, the default in many Linux distributions. The vulnerability allows anyone who can reach a server’s port 2049 to corrupt the memory of the nfsd process, the kernel component that serves NFS requests. It is rated 9.8 in severity.
A researcher with French security agency ANSSI, Jérémy Jean, found the bug in August, and his fix was merged into the mainline kernel on September 14.
According to security firm OpenSec Intelligence, which also discovered the heap overflow vulnerability and published technical details about it this week, the flaw can be exploited to gain a shell with root privileges. OpenSec found the bug using its AI-powered security testing harness and submitted its own patch to the Linux kernel maintainers on September 22.
However, since it takes time for all supported kernel branches to backport fixes, the bug wasn’t disclosed, nor was a CVE ID assigned, until November 19.
The flaw was introduced in Linux 3.16 in 2014 and is now patched in eight stable kernel branches: 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.61, 7.3.2 and 7.4-rc1.
On systems that can’t be immediately patched, administrators are advised to use firewall rules that block access to port 2049 from untrusted systems. Another option is to turn off NFSv4.1 and 4.2 in the nfsd config and then restart the service, but this will turn off pNFS and some features.
This article originally appeared on CSOonline.