CyberSecurityNews

12-Year-Old NFS2ROOT Linux Flaw Could Let Hackers Take Full Control of Servers Without a Password


A critical Linux kernel flaw called NFS2ROOT could let an attacker take full control of an unpatched Network File System (NFS) server without logging in.

The vulnerability, tracked as CVE-2026-99362, affects the Linux kernel’s NFS server when NFSv4.1 or NFSv4.2 is enabled and an attacker can reach TCP port 2049. The affected code dates back to Linux 3.16, released in 2014.

OpenSec Intelligence gave the flaw a severity score of 9.8 out of 10 and showed what it could do in a controlled test. In its November 25 video demonstration, a separate machine connects to the test server and causes it to run commands with root privileges.

The server then shuts down. OpenSec says it has kept the exploit private. The video shows that remote root access was possible in the tested setup, but does not establish that attackers have used the flaw in the wild.

NFS2ROOT Linux Vulnerability

NFS2ROOT Remote Root Exploitation Overview (Image Source: Opensec)

NFS lets computers access files stored on another machine. The affected Linux service nfsd, runs inside the kernel rather than as an ordinary application.

It caches recent replies so that if a client retries a request, the server can return the same answer without doing the work again. The flaw lies in how the server decides whether a reply fits in that cache.

An affected server can treat an incomplete reply as a success and try to store it in a buffer that is too small. The resulting write spills beyond the space set aside for the reply and can damage nearby kernel data.

This is known as a heap overflow. The fix makes the server check that there is enough room and report an error when the reply cannot fit. Unlike the Copy Fail Linux kernel flaw, NFS2ROOT does not require an attacker to already have local access.

Session Reply-Cache Heap Overflow Diagram
Session Reply-Cache Heap Overflow Diagram (Image Source: Opensec)

OpenSec credits Jérémy Jean of France’s national cybersecurity agency, ANSSI, with submitting an upstream fix in August 2026. OpenSec says its automated research tool, Antara, independently found the flaw and built the working demonstration.

The company notified Linux kernel security staff and NFS maintainers in September. The official CVE record lists November 19 as the publication date.

Check Linux file servers, network-attached storage appliances, build servers, and storage nodes that serve NFS shares to Kubernetes workloads. A Linux machine that only mounts a remote share as a client does not expose this server flaw by doing so.

NFS2ROOT is also separate from the Kubernetes NFS CSI driver vulnerability, which involved how the driver handled directory paths rather than how the Linux kernel’s NFS server handled replies.

Kernel Warning and KASLR Leak
Kernel Warning and KASLR Leak (Image Source: Opensec)

On a Linux NFS server, cat /proc/fs/nfsd/versions shows whether +4.1 or +4.2 is enabled. The command ss -ltn 'sport = :2049' shows whether the host is listening on TCP port 2049.

A listening port does not tell you which machines can reach it. Review firewall rules and cloud security groups to check access from other network segments.

A file server does not need to face the public internet to be reachable from a compromised machine on the internal network.

Confirmed Remote Root Shell Execution
Confirmed Remote Root Shell Execution (Image Source: Opensec)

The official list of fixed kernel versions includes Linux 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. For a distribution kernel or storage appliance, check the vendor’s advisory for CVE-2026-99362 rather than relying on the version number alone.

Vendors can apply the fix to an older kernel branch without adopting the upstream release number. After installing the update, reboot and run uname -r to confirm the system is running the updated kernel.

If you cannot patch immediately, limit access to TCP port 2049 to machines that need it. OpenSec also recommends disabling NFSv4.1 and NFSv4.2 where workloads allow it.

Check client requirements before restarting the NFS service, since disabling those versions can remove features that storage workloads depend on. Treat both steps as temporary measures, not substitutes for patching.

For systems that were reachable before patching, OpenSec’s detection guidance points to kernel warnings involving nfsd4_check_resp_size, unexpected shells started by kernel workers, and bursts of short NFSv4.1 sessions from one source.

These are leads, not proof of compromise. Compare the timestamps with network and process logs, and prioritize any unexplained commands that ran with root privileges.

Give your SOC the alert context on the latest threats to stop incidents quickly -> Integrate Threat Intel from 16K SOCs



Source link