Linux NFS bug CVE-2026-99362 allows remote root without login

Linux NFS bug CVE-2026-99362 allows remote root without login

OpenSec has published details of CVE-2026-99362, a pre-authentication heap overflow in nfsd, the NFS server built into the Linux kernel. The bug has been present since Linux 3.16 in 2014. According to OpenSec, anyone who can reach tcp/2049 on an affected host can write into kernel memory before logging in, and chaining further steps yields a root shell. The firm lists the severity as 9.8 Critical (AV:N/AC:L/PR:N/UI:N). Affected are Linux hosts serving NFSv4.1 or 4.2, which are on by default, on a reachable port 2049.

The root cause sits in the reply cache. Each NFSv4.1 session slot stores its last reply so that a retried request is answered exactly once, and the client decides how big that cache is. If the client sets it to the minimum, each slot's buffer is zero bytes. The function nfsd4_sequence() shrinks the reply buffer to that limit before it accepts the slot. By padding the request's tag so the buffer fills right after the SEQUENCE opcode, an attacker makes the encoder quit without flagging an error. The server believes SEQUENCE succeeded and caches the whole reply into a buffer with no room. That copies 80 bytes, 61 of them past the end of the heap object, with 40 chosen by the client. OpenSec traces the flaw to commit 47ee52986472.

The exploit stays private, but OpenSec outlines it as a series of ordinary NFS requests. The overflow corrupts a neighboring slot's bookkeeping. A replay request then returns 3.8 KB of kernel heap, which reveals the KASLR slide. A forged pointer makes the kernel free an object the attacker picks, and that memory is refilled with a fake callback built from NFS client names. When the client hangs up, nfsd calls the callback and the kernel runs /bin/sh as root. In the recorded demonstration, the victim machine prints root, then uid=0(root), and powers itself off.

OpenSec says Antara, its white-box harness, flagged the vulnerable reply-cache path, scored it 9.8 and built the leak, the arbitrary free and the root shell end to end with no human in the loop. Jérémy Jean of ANSSI found the bug independently and wrote the upstream fix. OpenSec reported it to the NFSD maintainers and security@kernel.org on 22 September 2026 with the full exploit, and sent a patch the same day. The CVE was published with fixes on 20 November. Linux 6.12.117, 6.18.61, 7.3.2 and 7.4-rc1 contain the fix. The advice is to update and reboot, and to firewall tcp/2049 until then.

Key facts

  • CVE-2026-99362 is a pre-authentication heap overflow in the Linux kernel's NFS server, present since Linux 3.16 (2014) and listed by OpenSec as 9.8 Critical.
  • Hosts serving NFSv4.1 or 4.2 (the default) on a reachable tcp/2049 are affected; one connection writes 61 bytes past a kernel heap object.
  • OpenSec says its harness Antara escalated the overflow to a root shell with no human in the loop; the exploit remains private.
  • Fixes are in Linux 6.12.117, 6.18.61, 7.3.2 and 7.4-rc1; until patched, firewall port 2049 or disable NFSv4.1 and 4.2.
  • OpenSec reported the bug on 22 September 2026, and the CVE was published with fixes on 20 November.

Why it matters

The NFS server runs inside the kernel and parses network input before it knows who the client is. A flaw in that window needs no credentials, and OpenSec says this one ends in root on the server. It also sat in the code for 12 years: every kernel since 3.16 carried it, including long-term support, distribution and appliance kernels. The mechanism is compact. The server shrank its reply buffer to a size set by the client, and the encoder gave up without reporting an error. The fix checks that the reply fits before taking the slot and makes the encoder report what it cannot fit.

Who it affects

Any Linux host that serves NFSv4.1 or 4.2 over a reachable tcp/2049. Both versions are on by default. OpenSec notes that this port sits open on file servers, NAS appliances, build farms and Kubernetes storage nodes, so administrators of those systems have good reason to check what they expose and which kernel they run.

How to use it

Patch and reboot. The fixed releases OpenSec lists are 6.12.117, 6.18.61, 7.3.2 and 7.4-rc1. On a distribution kernel, install the update that lists CVE-2026-99362.

If you cannot patch today, close port 2049 with a firewall, or turn off NFSv4.1 and 4.2 and restart nfs-server. The second option also turns off pNFS and some 4.2 features.

To hunt for attacks, look for kernel warnings from nfsd4_check_resp_size, which appear on every attempt whether it succeeds or not; oopses with nfsd4_, svc_ or call_usermodehelper* frames; shells spawned by kernel workers on a file server; and bursts of short NFSv4.1 sessions from one source.

How solid is it

This is a first-party account from one of the finders. OpenSec describes the root cause down to the function and commit, outlines the exploit steps and shows a recorded run in which a client on another machine talks to the victim only over tcp/2049. The exploit code is not public. The upstream fix was written by Jérémy Jean, who found the bug on his own, and OpenSec's timeline lists his fix ahead of Antara's finding. The 9.8 score is the one OpenSec lists and says Antara assigned. The claim that Antara worked with no human in the loop is the company's own description of its tool.

Risks and caveats

OpenSec warns that kernel hardening does not remove the overflow and says every host should be patched. The attack consists of valid NFS, so the firm says there is no network signature to detect it by. Disabling NFSv4.1 and 4.2 costs some functionality. The source does not report any exploitation of the bug in the wild, and it does not say which distributions have already released updated packages. Fixed versions are listed only for the 6.12, 6.18, 7.3 and 7.4 lines.

“Kernel hardening does not remove the overflow. Patch every host.”

— OpenSec