RC RANDOM CHAOS

A kernel NFS bug has granted remote root since 2014

CVE-2026-99362 (NFS2ROOT) lets an unprivileged remote attacker reach root on Linux nfsd through TCP port 2049. Patch, reboot, and restrict the port.

· 2 min read
A kernel NFS bug has granted remote root since 2014

An unprivileged attacker who can reach TCP port 2049 on an unpatched Linux NFS server can get a root shell on it. The bug, tracked as CVE-2026-99362 and named NFS2ROOT by the firm OpenSec, has sat in the kernel’s NFS server since version 3.16, released in March 2014, which makes it about twelve years old.

ANSSI’s Jérémy Jean found it and submitted a fix in August. OpenSec built a full remote-root exploit and handed it, along with a patch, to the NFSD maintainers in late September. There are no reports of exploitation in the wild yet.

The flaw is a heap buffer overflow in nfsd. A maliciously crafted NFSv4.1 or 4.2 request makes the server write data past an allocated buffer. From there the exploit reads kernel memory to defeat KASLR, then places a callback in a freed memory region. When the attacker closes the NFS connection, the kernel runs the embedded command with root privileges. No credentials, no user interaction, low complexity.

A host is exposed if it runs a kernel older than 6.12.117, 6.18.61, 7.3.2, or 7.4-rc1, has nfsd loaded and serving v4.1 or 4.2, and has port 2049 reachable over the internet. OpenSec’s framing of the reach is the uncomfortable part: port 2049 sits open on file servers, NAS appliances, build farms and Kubernetes storage nodes, and since 2014 the kernel listening on it has let anyone who can reach it write into kernel memory before logging in. Kernel hardening does not remove the overflow.

Apply the kernel update from your distribution vendor and reboot, so the running kernel is the patched one rather than the vulnerable one still in memory. If you can’t patch right away, restrict port 2049 to trusted clients and networks. If a host does not need to export NFS at all, stop and disable the nfs-server service in /etc/nfs.conf.

Detection is thin, because the exploit leaves no network signature. OpenSec suggests watching the hosts themselves: kernel warnings from nfsd4_check_resp_size, shells spawned by kernel worker threads on a file server, bursts of short NFSv4.1 sessions from a single source, and kernel oopses carrying nfsd4_, svc_, or call_usermodehelper* frames. A file server’s kernel worker spawning a shell is about as clear a signal as you’ll find.

NFS2ROOT joins a long run of Linux privilege-escalation bugs disclosed and patched this year, among them RefluXFS, CIFSwitch, Dirty Frag, Fragnesia, PinTheft, Copy Fail, Pack2TheRoot, and DirtyDecrypt/DirtyCBC.

Share

Keep Reading

Latest on the Wire

Full wire →

New signal daily · RSS

Stay in the loop

New writing delivered when it's ready. No schedule, no spam.