SecuFocus
BriefAnnouncements

NFS2ROOT: a 12-year-old flaw gives remote root on Linux NFS servers

The defect is in nfsd, the NFS server built into the Linux kernel. A single connection to port 2049 is enough, with no credentials. Kernels are patched; Ubuntu 24.04 and part of Debian bookworm are not yet.

Generated image: a dark network storage rack, an Ethernet cable plugged into a port whose LED glows pale mint.

Generated image · SecuFocus

At a glance

Key points

At a glance Key points The NFS server built into the Linux kernel, nfsd , has carried since 2014 a defect that writes past the end of a kernel buffer before any authentication, then yields root. A single connection to port 2049 is enough. The flaw is in the kernel itself, not in an optional package. Any machine that exports files over NFS carries the faulty code. Upstream kernels are fixed. Ubuntu 24.04 LTS and 22.04 LTS still have no published patch; two bookworm kernels remain marked vulnerable. Restricting port 2049 to the internal network comes before updating.

The defect and what it allows

The defect carries a name given by its discoverers, NFS2ROOT, and an official identifier, CVE-2026-99362. It sits in nfsd, the NFS server built into the Linux kernel. It is therefore neither an optional package nor a third-party service: the faulty code is present in the kernel as soon as the machine exports files over NFS.

The flaw has existed since kernel 3.16, released in 2014, which is where its twelve years come from. It was fixed in the upstream kernel, then backported to the maintained stable branches. The patch is titled nfsd: preflight SEQUENCE replies before accepting a slot: it moves a size check ahead of accepting a reply slot, where it arrived too late.

The CVSS 3.1 score is 9.8, with the vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. In plain terms: attackable over the network, with no particular complexity, no prior privilege and no action from a victim, with full impact on confidentiality, integrity and availability.

One connection is enough, before any authentication

The mechanism rests on NFSv4.1 session negotiation. A client tells the server the maximum reply size it is willing to see cached, and that value can go down to the minimum the protocol allows. The server then shrinks its reply buffer and gives each slot a data area of zero length.

A single compound request (COMPOUND) is then enough to fill that shrunken buffer past its size, before any authentication. That is an out-of-bounds write into kernel memory, triggerable over a single TCP connection to port 2049. The discoverers report obtaining root access on a test server, and reporting the problem to the nfsd maintainers and to the kernel security list on 22 September 2026, with a patch proposed the same day.

What this means in practice: the flaw needs no password, no account and no click from a user. It only needs port 2049 to be reachable. An NFS server exposed to the internet is therefore the bad case, and it is the one to handle first.

Which versions are fixed

The fixed stable branches, as listed by the official CVE record and by the discoverers, are 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.61 and 7.3.2, with the upstream patch in 7.4-rc1. A distribution is protected only if its installed kernel carries a number at least equal to that of its branch.

Checking distribution by distribution gives a more nuanced picture than the upstream numbers alone. As of 27 November 2026, Ubuntu's security page still lists 24.04 LTS (noble) and 22.04 LTS (jammy) as vulnerable, with no published patch, and mentions work in progress for 26.04 LTS. An up-to-date Ubuntu 24.04 server has therefore not received the fix through the normal update path.

Debian is partly fixed: trixie is at 6.12.117-1 and fixed, forky and sid likewise, and bookworm received a fix through security update 6.12.117-1~deb12u1. However, the 6.1.176-1 and 6.1.192-3 kernels of bookworm remain marked vulnerable in Debian's tracker. The exact kernel version has to be read, not just the distribution name.

We found no CERT-FR or Swiss BACS advisory dedicated to this vulnerability at the time of writing. That does not mean they are not tracking it, but we do not claim it.

What it changes for a server in Switzerland

NFS remains common in small and mid-sized Swiss businesses for three uses: sharing volumes between Linux servers, providing storage to a virtualisation platform, or feeding network backups. A Synology or QNAP NAS often exposes NFS alongside SMB, sometimes switched on without anyone using it.

Three questions are enough to sort situations out. Does the server actually export NFS, and to whom? Is port 2049 reachable from the internet, or only from the internal network? Does the installed kernel reach the fixed level of its branch? If the answers are "yes", "from the internet" and "no", the machine is in the configuration the flaw describes, and closing the access comes before updating.

The recommendation that holds in every case: restrict port 2049 to the internal perimeter. NFS has no reason to be exposed to the internet. Remote access goes through a VPN, which narrows the window of risk even before the kernel is patched.

Checking your own machine

On the machine itself, uname -r gives the running kernel version. It has to be compared with its branch: 6.12.117 for a 6.12, 6.1.193 for a 6.1, 6.6.163 for a 6.6, 6.18.61 for a 6.18. A lower version means an unpatched kernel.

To find out whether NFS is running, systemctl status nfs-server answers on mainstream distributions, and ss -ltnp | grep 2049 shows whether the port is listening and on which address. A listener on 0.0.0.0:2049 on a machine with a public address is the signal to act on without waiting.

On Ubuntu 24.04 and 22.04, where no fix is published yet, the options are the upstream kernel provided by the project, waiting for the vendor patch, or taking the NFS service out of public exposure. We do not present the upstream kernel as a general recommendation: it changes the support perimeter, and that decision belongs to the administrator.

What we did not verify

We did not run the exploit or reproduce the flaw on a test server. The mechanism described above is that of the upstream patch and of the analysis published by the discoverers, not the result of a test run by our editorial team.

We have no measurement of real-world exploitation. CVE-2026-99362 was not in CISA's catalogue of exploited vulnerabilities at the time of our check, which indicates the absence of publicly confirmed exploitation, not the absence of exploitation.

Distribution version numbers change quickly, and the pages we cite are updated without notice. The Ubuntu and Debian states reported here are those of 27 November 2026 and must be checked again before any decision.

Check and explore

Sources for this article

Numbers connect each reference to the passages that use it. Dates show when the documentation was consulted.

  1. NIST · NVD, CVE-2026-99362 ↗nvd.nist.gov ·

This article draws on the sources above. The exercises are for you to try on your devices; SecuFocus does not present them as tests carried out by its editorial team. Interfaces and features can change. Method and corrections.

Cite this article

Keep this reference with the article when you save or share it.