← Home

NFS2ROOT: 12-Year-Old Linux Kernel Flaw Grants Remote Root to Anyone

Linux server security received an unexpected blow this week with the disclosure of a vulnerability that is as old as the network filesystem it lives in. CVE-2026-99362, nicknamed NFS2ROOT, has resided for twelve years in the `nfsd` module of the Linux kernel, present since the release of kernel 3.16 in March 2014, and allows anyone connected to port 2049 to gain full control of the server, without authentication, without a password, and without user interaction.

What makes NFS2ROOT particularly dangerous is not the sophistication of the exploit \u2014 it relies on a simple programming error, a 61-byte `slab-out-of-bounds` on a kernel heap region \u2014, but its ubiquity. Every Linux server running an NFS service, from a home NAS to a Kubernetes storage node exposed on the internet, is on the affected list. The problem has existed for more than a decade because the SEQUENCE reply cache validation code introduced in kernel 3.16 was simply never fixed: a client can reduce the cache to zero bytes and make the server copy a full response into it.

How the exploit works

The attack flow is direct and brutal. A remote client sends an NFSv4.1 or NFSv4.2 request to the server's port 2049. The `nfsd` module, which runs inside the kernel memory space, parses the request without knowing who sent it. The client then reduces the response buffer to zero bytes. The server copies an 80-byte response into that zero-size buffer. Sixty-one bytes overflow past the allocated kernel heap object.

The result is a `KASAN` kernel warning, but the damage is already done. The out-of-bounds copy allows the attacker to read kernel memory, bypassing KASLR (Kernel Address Space Layout Randomization), which protects kernel memory addresses. With the addresses known, the attacker inserts a callback into a freed memory area. When the NFS connection is closed by the client, the kernel executes the embedded callback with root privileges.

The OpenSec team, which named the vulnerability NFS2ROOT, developed a functional exploit that obtains a root shell on its own test machine. The video available on the company's blog shows the victim and attacker sides on separate screens: the victim displays the `WARNING` from `nfsd4_check_resp_size`, while on the attacker's terminal the root shell appears.

Why 12 years?

The root of the bug is a line of code introduced in commit `47ee52986472`, which narrowed the response buffer when handling `SEQUENCE`. At the time, the intent was sound: limiting buffer size was a protective measure against overflow. The problem is that the restriction was applied incorrectly, creating a memory overflow condition.

The commit was included in kernel 3.16, released in March 2014. Since then, the bug has passed through all LTS kernel versions, including 5.10, 5.15, 6.1, 6.6, 6.12, 6.18, and 7.3. Each stable release brought the same flaw. The reason the error went undetected is likely the combination of two factors: first, the `nfsd` module runs in kernel space, and many distribution kernels have KASAN disabled by default, meaning memory overflows only appear as strange behavior (or not at all); second, many NFS servers run behind firewalls or on private networks, and the exploit only works if port 2049 is internet-accessible.

The discovery traces back to August 2026, when J\u00e9r\u00e9my Jean from ANSSI (the French cybersecurity agency) sent an upstream patch with a detailed KASAN report. OpenSec identified the issue on September 21, scored it at CVSS 9.8, and developed the exploit in days. The CVE was officially published on November 19.

The real impact

NFS2ROOT is not a theoretical vulnerability. It affects systems that form the backbone of modern data infrastructure:

NAS storage: Many consumer and small-business NAS devices run the kernel's `nfsd` module for file sharing. If port 2049 is forwarded on the router, the device can be remotely compromised. Unlike web application exploits, there is no login to break \u2014 anyone on the internet can connect and gain root.

Kubernetes and container clusters: The default persistent storage configuration in many Kubernetes clusters uses NFS as a backend. Storage nodes with NFS exposed on the internet are priority targets. An attacker who gains root on a storage node can access all cluster data, including service tokens, secret environment variables, and container images.

Backup servers: Tools like BorgBackup and Restic often use NFS as a backup destination. A compromised NFS server means backup data can be read, modified, or deleted by the attacker.

Data centers and clouds: Cloud storage services that offer NFS as part of their offering (such as Amazon EFS or Google Cloud Filestore) run on underlying Linux infrastructure. If an internal NFS server is exposed, NFS2ROOT can serve as a lateral movement vector.

As of this date, there are no reports of exploitation in production environments. The absence of live exploits in the real world does not mean the vulnerability is safe \u2014 the full disclosure of technical details, with a functional proof of concept, significantly increases the probability that large-scale attacks will appear soon.

How to protect yourself

The fix is already available. The fixed kernel versions are:

- 5.10.275 - 5.15.226 - 6.1.193 - 6.6.163 - 6.12.117 - 6.18.61 - 7.3.2 - 7.4-rc1 (mainline)

Most distributions have already released updated packages. The protection process has three steps: update the kernel to the latest fixed version for your LTS branch, reboot the server to load the corrected kernel, and verify that the NFS service is no longer accessible from the public internet if you don't need it.

If immediate update is not possible, the most effective measure is to block port 2049 on the firewall. Many administrators opt to disable NFSv4.1 and NFSv4.2 in the NFS service configuration file, keeping only NFSv3 if necessary. This prevents the exploit from working, because the vulnerability resides specifically in the `SEQUENCE` reply cache handling, which only exists in versions 4.1 and 4.2.

The lesson from NFS2ROOT is that twelve years of code without security reviews can result in a single critical failure point. The Linux kernel is the most widely deployed server operating system on the planet, and NFS is one of the oldest and most widely used protocols. A single line of code, introduced as a protective measure and turned into a 9.8-rated breach, serves as a reminder that the security of complex systems depends on continuous review, not just initial implementation.

What remains for the security community is to observe whether OpenSec and other vulnerability research groups will publish more details about exploitation techniques \u2014 and, more importantly, whether system administrators will actually reboot after applying the patch. Because an exploit that works from anywhere on the internet doesn't wait for the server to restart.

Sources: BleepingComputer, OpenSec Intelligence, watchTowr Intel

✓ Independent sources cross-checked and verified before publishing