Coresoft MMC

NFS2ROOT: one connection to port 2049 can take over a Linux file server

27 November, 2026

NFS2ROOT: one connection to port 2049 can take over a Linux file server

A serious flaw has been found in nfsd, the NFS server built into the Linux kernel. It has been there since 2014 and kernel 3.16. Tracked as CVE-2026-99362 and nicknamed NFS2ROOT, it sits in the way the server caches replies in NFSv4.1 and 4.2 sessions. A client negotiates the reply buffer down to the minimum, and the server then writes the whole reply anyway, past the end of that buffer. Memory gets corrupted, and the server also sends part of it back. OpenSec, the team that found it, has shown remote root without a password on top of this. It is rated CVSS 9.8.

All an attacker needs is to reach TCP port 2049. No credentials are required. Only machines that act as an NFS server are at risk: computers that simply mount a share, and user-space servers such as NFS-Ganesha, are not affected. A file server does not have to face the internet to be exposed, since any compromised machine on the internal network can reach it. So far there are no reports of real attacks, and the exploit has not been published.

The fix is in kernels 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.61 and 7.3.2. Distributions ship it under their own version numbers, so check the kernel package changelog rather than uname -r. As of 25 November, Debian 13 already had a fixed kernel, while Ubuntu and RHEL were still working on theirs. After installing the new kernel, the server has to be rebooted.

To see whether a server runs nfsd, look at /proc/fs/nfsd/versions: if it lists +4.1 or +4.2, the server may be affected. Until the update arrives, open port 2049 only to the clients that need it. As a stopgap, you can add vers4.1=n and vers4.2=n under an [nfsd] section in a file in /etc/nfs.conf.d/ and restart nfs-server. Existing 4.1 mounts will break and have to be mounted again.

Sources: watchTowr: NFS2ROOT FAQ, Cyber Security News, RFF: how to check your server