Vulnerabilities and exploitation

NFS2ROOT: 12-year-old Linux NFS server flaw hands attackers root

CVE-2026-99362 lets an unauthenticated client corrupt kernel memory on Linux file servers reachable on TCP port 2049. Fixes are out for the kernel branches listed by watchTowr, from 5.10 to mainline.

By Junglewise News DeskPublished 5 min read
Video: Junglewise Live

A critical flaw in the Linux kernel's built-in NFS server lets an unauthenticated attacker who can reach TCP port 2049 corrupt kernel memory and take root control of the machine. The bug, tracked as CVE-2026-99362 and nicknamed NFS2ROOT, has been present since kernel version 3.16, released in March 2014, which means it has quietly shipped on file servers for twelve years.

Systems in scope are those running the Linux kernel NFS server (nfsd) with NFS version 4.1 or 4.2 sessions enabled and port 2049 reachable by an attacker. No configuration beyond that is required: the CVE record marks the kernel as affected by default from 3.16 onward. BleepingComputer reported that exploitation requires no user interaction and is low complexity, and that security firm OpenSec shared a full remote-root exploit with the NFSD maintainers. No exploitation in the wild has been recorded, and the flaw is not listed in the United States Cybersecurity and Infrastructure Security Agency (CISA) Known Exploited Vulnerabilities catalog.

OpenSec, which named the bug, pointed out where this service tends to live: "Port 2049 sits open on file servers, NAS appliances, build farms and Kubernetes storage nodes," the firm said, adding that kernel hardening does not remove the overflow and that every host should be patched.

What to do now

  1. Identify every host running nfsd, and note the kernel branch and version each one uses. Network-attached storage appliances, build servers and Kubernetes storage nodes count.
  2. Apply the latest kernel security update from your Linux distribution vendor, then reboot. The fix must be in the running kernel, not just on disk, so confirm afterwards that the booted version matches or exceeds the fixed version for your branch (see the technical details below).
  3. If you cannot patch immediately, restrict access to TCP port 2049 with firewall rules so only trusted clients and networks can reach it, particularly on internet-exposed systems. Alternatively, turn off NFSv4.1 and 4.2 in the NFS service configuration file. Red Hat notes that limiting port access narrows exposure rather than fixing the bug.
  4. If NFS sharing is not needed on a host, stop and disable the nfs-server service in /etc/nfs.conf and leave it off.
  5. Watch for signs of attempted exploitation. There are no network signatures, so monitoring has to happen on the host. Look for kernel warnings from nfsd4_check_resp_size, any shell process started by a kernel worker thread on a file server, a single source opening and closing many short-lived NFSv4.1 sessions in quick succession, and kernel oopses whose stack traces include nfsd4_*, svc_* or call_usermodehelper* frames.

Technical details

CVE-2026-99362 is a heap buffer overflow in the kernel NFS server's handling of the SEQUENCE operation, the per-session bookkeeping call introduced with NFS version 4.1. It carries a CVSS v3.1 score of 9.8, rated critical, according to watchTowr.

The root cause is an ordering mistake. The function nfsd4_sequence() narrows the reply buffer before checking that a SEQUENCE result plus the status of the following operation will fit inside the negotiated ca_maxresponsesize_cached limit. A client can negotiate that limit all the way down to NFSD_MIN_HDR_SEQ_SZ, at which point nfsd4_alloc_slot() creates zero-length reply caches. When a COMPOUND tag then fills the buffer, nfsd4_store_cache_entry() writes past the end of the slot's sl_data[] array. The fix validates the buffer space requirement before the buffer is narrowed and the slot is consumed.

From the attacker's side the sequence is straightforward. The client negotiates the cached reply size down to the server's minimum header size, the server accepts the session slot with an undersized buffer, and the server then copies an entire reply, protocol headers included, past the end of it. The overwritten bytes come largely from the client's own request, and the server sends much of that overwritten memory back in its reply. That gives an attacker a read into kernel memory, enough to defeat kernel address space layout randomisation (KASLR), the defence that scatters kernel code to unpredictable addresses. BleepingComputer reported that an attacker can then place a callback containing a command in freed memory; when the NFS connection is closed, the kernel executes that command with root privileges.

Affected and fixed versions by branch, as listed by watchTowr: 5.10 fixed in 5.10.275, 5.15 in 5.15.226, 6.1 in 6.1.193, 6.6 in 6.6.163, 6.12 in 6.12.117, 6.18 in 6.18.61, 7.3 in 7.3.2, and mainline in 7.4-rc1. Every branch is vulnerable from 3.16 onward.

The disclosure timeline runs back several months. The bug was surfaced upstream by the community on 17 August 2026, with a fix submitted by Agence nationale de la sécurité des systèmes d'information (ANSSI) researcher Jérémy Jean in August, according to BleepingComputer. OpenSec reported it as a security issue on 21 September 2026, together with a working remote-root exploit and a patch. The CVE record was published on 19 November 2026, under a title about preflighting SEQUENCE replies before accepting a slot.

As of 26 November 2026, watchTowr's FAQ reported no exploitation in the wild, and BleepingComputer reported the same a day later. No public attribution exists for what kinds of threat actors might target the flaw, and no indicators of compromise tied to real-world attacks have been published, which is why the detection advice above is behavioural rather than signature based.

NFS2ROOT is not an isolated event for Linux this year. BleepingComputer counts it as the latest in a run of privilege escalation flaws disclosed and patched since January, a list that also includes the bugs known as RefluXFS and CIFSwitch, the pair named Dirty Frag and Fragnesia, PinTheft, Copy Fail, Pack2TheRoot, and the flaw tracked as DirtyDecrypt or DirtyCBC. What sets this one apart is that it needs no local foothold at all: just a route to port 2049.

Share this article

On Junglewise Threat Intelligence

Related stories

Scan your domain free: see what attackers can see from outside, in about 30 seconds.

This article as Markdown. Atom feed.