17 min to read
NFS2ROOT (CVE-2026-99362): Find, Fix and Hunt Exposed Linux NFS Servers
A 12-year-old nfsd bug gives root to anyone who can reach port 2049. Here is how to audit your fleet before attackers do.
Most “Linux root” bugs you read about need a foothold first: a local user, a container, a compromised web app. NFS2ROOT does not. It is a heap overflow in nfsd, the NFS server built into the Linux kernel, and it can be triggered before authentication by anyone who can open a TCP connection to port 2049. No credentials, no file handle, no mount. OpenSec, which named the bug, turned it into a working root shell in its lab.
The code has been vulnerable since Linux 3.16 (2014). The CVE was published on 19 November 2026, OpenSec’s write-up landed on 25 November, and at the time of writing several major distributions, including Ubuntu LTS and RHEL, still had no fixed kernel. That gap is why this is a hands-on guide rather than a news recap: for many teams, the next week will be about finding exposed NFS servers, containing them, and watching for attempts until a patch arrives.
TL;DR / Key takeaways
- CVE-2026-99362 (NFS2ROOT) is a pre-auth out-of-bounds write in Linux
nfsd’s NFSv4.1 session handling. CVSS 3.1 is 9.8 per the CVE record (Red Hat scores it 9.4). OpenSec demonstrated remote root.- You are exposed only if all of these are true: the running kernel lacks the fix, the in-kernel NFS server is running, NFSv4.1 or 4.2 is enabled (the default), and TCP 2049 is reachable from somewhere you do not trust. NFS clients are not affected.
- Fixed upstream in 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.61, 7.3.2 and 7.4-rc1. Debian has fixes; Ubuntu and RHEL were still listed as vulnerable when we checked. Check the changelog, not just
uname -r.- Stopgaps: restrict 2049 (IPv4 and IPv6) to known clients, or set
vers4.1=n/vers4.2=nin/etc/nfs.conf. Kernel hardening does not stop the overflow.- Hunt signal: there is no network signature. Watch kernel logs for
nfsd4_check_resp_sizewarnings,nfsd4_*/svc_*oopses and shells spawned by kernel workers.
Timeline
| Date | Event |
|---|---|
| 2014 | Vulnerable code introduced (commit 47ee52986472), shipping in Linux 3.16. |
| 17 Aug 2026 | Jérémy Jean of France’s ANSSI submits the upstream fix. |
| 21–22 Sep 2026 | OpenSec’s automated research harness independently finds the bug, builds an exploit and reports it to the NFSD maintainers and [email protected]. |
| 6–23 Nov 2026 | Fixed stable kernels released across eight branches. |
| 19 Nov 2026 | CVE-2026-99362 published by the kernel.org CNA. |
| 25 Nov 2026 | OpenSec publishes its NFS2ROOT write-up; BleepingComputer and others report it. |
| 26–28 Nov 2026 | Debian ships fixes; Ubuntu lists fixes “in progress”; RHEL 6–10 still affected with no errata. No in-the-wild exploitation or public exploit reported; not in CISA KEV. |
Some details are still moving, especially distribution package status. Treat the versions below as a starting point and confirm against your vendor’s tracker on the day you patch.
How the flaw works (conceptually)
NFSv4.1 introduced sessions. Each session has a fixed number of slots, and the server keeps a small reply cache per slot so it can safely replay a response if a client retransmits. During session creation the client negotiates how big that cached reply can be (ca_maxresponsesize_cached).
According to the technical analyses of the fix, a client can negotiate that size down to the minimum, so the server allocates zero-length slot buffers. nfsd4_sequence() then narrows the reply buffer before it validates the slot’s sequence ID. With a carefully padded COMPOUND request, the server ends up copying a full reply of about 80 bytes into that zero-length buffer. KASAN puts about 61 of those bytes past the end of the heap object, with much of the data chosen by the client.
OpenSec chained this into a full exploit: a roughly 3.8 KB kernel heap leak to defeat KASLR, a controlled free, then reclaiming that memory with a forged NFS callback structure. When the attacker disconnects, the kernel runs the callback as root. The exploit is private, and no public proof-of-concept had been reported at the time of writing.
The upstream fix, titled “nfsd: preflight SEQUENCE replies before accepting a slot”, checks that the SEQUENCE result, plus room for the next operation’s status, fits in the negotiated cache size before the slot is used.
Three points matter for defenders:
- Exports are not the boundary. The bug fires before export checks. A server with an empty
/etc/exportsbut a listeningnfsdis still in scope. - The traffic is valid NFS. There is no clean IDS signature, so detection happens on the host.
- Hardening does not help. OpenSec’s advice is blunt: “Kernel hardening does not remove the overflow. Patch every host.”
Am I affected?
Think about where in-kernel NFS servers hide in a typical estate:
- File servers and home-directory servers
- Backup targets and NFS datastores for VMware or Proxmox
- Build servers, CI caches and Kubernetes storage nodes (NFS provisioners)
- Self-built NAS boxes, and some commercial NAS appliances (check Synology, QNAP and TrueNAS advisories separately)
Not affected: machines that only mount NFS shares, and user-space servers such as NFS-Ganesha, which do not use nfsd. NFSv3 and NFSv4.0 are not affected either, because the bug needs a v4.1+ session.
Fixed versions
Upstream stable kernels:
| Branch | First fixed release |
|---|---|
| 5.10 LTS | 5.10.275 |
| 5.15 LTS | 5.15.226 |
| 6.1 LTS | 6.1.193 |
| 6.6 LTS | 6.6.163 |
| 6.12 LTS | 6.12.117 |
| 6.18 | 6.18.61 |
| 7.3 | 7.3.2 |
| Mainline | 7.4-rc1 |
Distributions (checked 28 November 2026):
- Debian 13 (trixie): fixed in
linux6.12.117-1 (6.12.118-1 in security). - Debian 12 (bookworm): fixed in
linux6.1.192-3 (DLA-4942-1) and in thelinux-6.12backport 6.12.117-1~deb12u1 (DLA-4927-1). Earlier write-ups that called 6.1.192-2 vulnerable were correct at the time; check your exact package revision. - Ubuntu: priority Critical. 16.04 through 24.04 LTS are listed as vulnerable. 26.04 LTS shows work in progress in 7.0.0-45.45, and 26.10 in 7.3.0-12.13. Cloud flavours (
linux-aws,linux-azure,linux-gcpand others) are affected too. - Red Hat: rated Critical, RHEL 6 through 10 affected with no fixed kernel reported yet. Red Hat notes that default RHEL installs do not run
nfsd.
This is exactly why version scanners struggle with this CVE. Distributions backport fixes, so 6.1.192-2 and 6.1.192-3 have the same upstream version but different exposure. Vendor and appliance kernels may sit below a fixed branch number while carrying the patch, or above one without it.
Step 1: Check a single host properly
Run these four checks. All four must be “yes” for a host to be exploitable.
~|#| 1. Does the running kernel carry the fix? (count > 0 ~|=| fixed)
~|#| Debian / Ubuntu
zgrep ~|-|cE 'CVE~|-|2026~|-|99362|preflight SEQUENCE replies before accepting a slot' \
/usr/share/doc/linux~|-|image~|-|$(uname ~|-|r)/changelog.Debian.gz 2>/dev/null \
|| zgrep ~|-|cE 'CVE~|-|2026~|-|99362|preflight SEQUENCE replies' \
/usr/share/doc/linux~|-|modules~|-|$(uname ~|-|r)/changelog.Debian.gz
~|#| RHEL / Rocky / Alma
rpm ~|-|q ~|-|~|-|changelog kernel~|-|core~|-|$(uname ~|-|r) | grep ~|-|cE 'CVE~|-|2026~|-|99362|preflight SEQUENCE replies'
~|#| 2. Is the in~|-|kernel NFS server present and serving? (threads > 0)
~|#| Don't rely on lsmod: nfsd may be built into the kernel.
ls /proc/fs/nfsd 2>/dev/null && sudo cat /proc/fs/nfsd/threads
~|#| 3. Is NFSv4.1 or 4.2 enabled? Look for +4.1 or +4.2
sudo cat /proc/fs/nfsd/versions
~|#| 4. Is 2049 listening beyond loopback (check IPv6 too)?
ss ~|-|ltn 'sport ~|=| :2049'
Two traps to avoid:
- Installed is not running. If a fixed kernel is installed but the host has not rebooted, it is still vulnerable. Compare
uname -rwith the newest installed kernel package. - The changelog check depends on how your vendor writes changelogs. A zero count on a custom or appliance kernel means “unknown”, not “vulnerable”. Ask the vendor.
Step 2: Audit the whole fleet
Here is a read-only script that combines those checks and prints one line per host. It changes nothing and does not send any NFS traffic.
~|#|!/usr/bin/env bash
~|#| nfs2root~|-|audit.sh ~|-| read~|-|only exposure check for CVE~|-|2026~|-|99362
h~|=|$(hostname ~|-|f 2>/dev/null || hostname); k~|=|$(uname ~|-|r)
fixed~|=|"unknown"
for f in /usr/share/doc/linux~|-|image~|-|$k/changelog.Debian.gz \
/usr/share/doc/linux~|-|modules~|-|$k/changelog.Debian.gz; do
[ ~|-|f "$f" ] && { zgrep ~|-|qE 'CVE~|-|2026~|-|99362|preflight SEQUENCE replies' "$f" && fixed~|=|yes || fixed~|=|no; break; }
done
if [ "$fixed" ~|=| unknown ] && command ~|-|v rpm >/dev/null; then
rpm ~|-|q ~|-|~|-|changelog "kernel~|-|core~|-|$k" 2>/dev/null | grep ~|-|qE 'CVE~|-|2026~|-|99362|preflight SEQUENCE replies' && fixed~|=|yes || fixed~|=|no
fi
threads~|=|$(cat /proc/fs/nfsd/threads 2>/dev/null || echo 0)
vers~|=|$(cat /proc/fs/nfsd/versions 2>/dev/null)
v41~|=|no; echo "$vers" | grep ~|-|qE '4\.(1|2)' && v41~|=|yes
listen~|=|$(ss ~|-|Hltn 'sport ~|=| :2049' 2>/dev/null | awk '{print $4}' | grep ~|-|vE '^(127\.|\[::1\])' | paste ~|-|sd, ~|-|)
status~|=|OK
if [ "$threads" ~|-|gt 0 ] && [ "$v41" ~|=| yes ] && [ ~|-|n "$listen" ]; then
[ "$fixed" ~|=| yes ] && status~|=|PATCHED~|-|SERVING || status~|=|EXPOSED
fi
echo "$h kernel~|=|$k fixed~|=|$fixed nfsd_threads~|=|$threads v4.1+~|=|$v41 listen~|=|${listen:~|-|none} ~|=|> $status"
Push it out with whatever you already use, for example:
ansible all ~|-|b ~|-|m script ~|-|a ./nfs2root~|-|audit.sh | grep ~|-|E 'EXPOSED|fixed~|=|unknown'
Then check reachability from the outside in. A host-level “listening on 0.0.0.0” only matters if a firewall lets traffic through, so scan port 2049 from each untrusted zone (internet, user VLANs, guest Wi-Fi, partner VPNs) against your own address ranges, with permission. An external attack-surface tool or your Shodan/Censys monitoring of your own IP space will tell you if anything is public. Prior research cited by Threat Landscape counted more than 1.5 million hosts with port 2049 open, most of them not internet-facing, so expect to find a few.
Step 3: Contain what you cannot patch today
In order of preference:
1. Patch and reboot. Nothing else removes the bug.
2. Firewall 2049 to known clients only. Do it for IPv4 and IPv6: one fleet audit found nfsd listening on IPv6 with a default-accept policy that IPv4-only reviews had missed. On RHEL-family systems with firewalld:
~|#| Replace with your real NFS client subnet(s)
firewall~|-|cmd ~|-|~|-|permanent ~|-|~|-|remove~|-|service~|=|nfs
firewall~|-|cmd ~|-|~|-|permanent ~|-|~|-|add~|-|rich~|-|rule~|=|'rule family~|=|"ipv4" source address~|=|"10.20.30.0/24" port port~|=|"2049" protocol~|=|"tcp" accept'
firewall~|-|cmd ~|-|~|-|permanent ~|-|~|-|add~|-|rich~|-|rule~|=|'rule family~|=|"ipv6" source address~|=|"fd00:20:30::/64" port port~|=|"2049" protocol~|=|"tcp" accept'
firewall~|-|cmd ~|-|~|-|reload ~|#| drops clients that are not explicitly allowed
On nftables-based hosts the same idea applies: allow your client sets to tcp dport 2049, then drop everything else, in an inet table so both address families are covered. If you also run NFSv3, restrict 111 and 20048 (and the lock/status ports shown by rpcinfo -p) the same way.
3. Disable NFSv4.1 and 4.2. Add a drop-in file such as /etc/nfs.conf.d/nfs2root.conf:
[nfsd]
vers4.1~|=|n
vers4.2~|=|n
Then systemctl restart nfs-server and confirm /proc/fs/nfsd/versions shows -4.1 -4.2. You lose pNFS and 4.2 features such as server-side copy. Lab testing published by RFF found that existing 4.1 mounts break (“Stale file handle”) until clients unmount and remount, while new mounts without a version fall back to 4.0. Schedule this with application owners.
4. If you don’t need NFS, turn it off: systemctl disable --now nfs-server.
Step 4: Hunt for exploitation attempts
Because the attack is ordinary NFS traffic, your best signals are on the host. OpenSec’s guidance lists four, and they map neatly onto data most teams already collect.
Kernel log warnings. The nfsd4_check_resp_size warning fires on every attempt, successful or not, which makes it the highest-value signal. Search locally:
sudo journalctl ~|-|k ~|-|~|-|since "~|-|30 days" | grep ~|-|E 'nfsd4_check_resp_size|nfsd4_|svc_|call_usermodehelper'
~|#| Older syslog~|-|based hosts
sudo grep ~|-|hE 'nfsd4_check_resp_size|nfsd4_' /var/log/kern.log* /var/log/messages* 2>/dev/null
The same search in Splunk, if you forward kernel logs:
index~|=|linux (sourcetype~|=|syslog OR sourcetype~|=|linux_messages_syslog OR sourcetype~|=|journald)
("nfsd4_check_resp_size" OR "nfsd4_" OR "call_usermodehelper")
| stats count min(_time) as first max(_time) as last by host
| convert ctime(first) ctime(last)
Shells spawned by kernel workers. A successful exploit runs its payload from kernel context, so look for a shell whose parent is a kernel thread (kworker, kthreadd, PID 2) or the usermode helper on a file server. A Sigma-style rule for Linux process creation:
title: Shell Spawned From Kernel Thread on NFS Server (possible NFS2ROOT)
status: experimental
logsource:
product: linux
category: process_creation
detection:
selection_parent:
~|-| ParentImage|contains: 'kworker'
~|-| ParentProcessId: 2
selection_child:
Image|endswith:
~|-| '/sh'
~|-| '/bash'
~|-| '/dash'
~|-| '/busybox'
~|-| '/python3'
~|-| '/nc'
condition: selection_parent and selection_child
falsepositives:
~|-| Legitimate usermode helpers (modprobe, core dump handlers) ~|-| baseline per host
level: high
With auditd you can collect the raw data by logging every execve by root on NFS servers (-a always,exit -F arch=b64 -S execve -F euid=0 -k root_exec) and reviewing the parent PIDs.
Bursts of short NFSv4.1 sessions from one source. If you have Zeek, NetFlow or firewall logs, look for one client opening many short TCP sessions to 2049, especially from addresses that never mounted anything before. A rough Zeek conn.log query in Splunk:
index~|=|zeek sourcetype~|=|zeek_conn id.resp_p~|=|2049 duration~|<|5
| bin _time span~|=|10m
| stats count dc(id.resp_h) as servers by _time id.orig_h
| where count > 50
Tune the threshold to your environment; backup jobs and autofs can be noisy.
Kernel oopses and unexplained crashes. Failed exploitation can crash or panic the server. Treat any recent nfsd-related oops, or an unexplained reboot of a file server, as worth a look, and keep the vmcore if kdump is enabled.
If you find a hit on an unpatched, reachable server, treat it as a potential root compromise: isolate it, capture memory and logs, rotate any credentials or keys stored on or mounted from it, and rebuild from a known-good image rather than “cleaning” it.
Prioritised checklist
Immediate (today)
- Run the audit script across all Linux hosts, including hypervisor storage, backup and Kubernetes nodes.
- Scan your external IP ranges for TCP 2049 and close anything public.
- Apply vendor kernel updates where available (Debian, upstream LTS) and reboot.
- For unpatched servers, restrict 2049 to known clients on IPv4 and IPv6.
- Search kernel logs for
nfsd4_check_resp_sizegoing back as far as you retain them.
This week
- Subscribe to Ubuntu and Red Hat CVE pages for CVE-2026-99362 and patch as soon as kernels ship.
- Where firewalling isn’t practical, disable NFSv4.1/4.2 with a planned client remount.
- Disable
nfs-serveron hosts that don’t need it. - Ask NAS and appliance vendors for a written statement on CVE-2026-99362.
- Deploy the kernel-thread shell detection and a 2049 connection-burst alert.
Longer term
- Put storage protocols (NFS, SMB, iSCSI) on dedicated, segmented storage networks.
- Use Kerberos-authenticated NFSv4 (
sec=krb5p) androot_squashwith explicit client lists. - Move exposure checks from version matching to changelog/backport-aware checks in your vulnerability management.
- Add live kernel patching or a faster reboot cadence for infrastructure servers.
OffensioX perspective
NFS2ROOT is the latest in a long run of 2026 Linux kernel bugs, after Copy Fail, Dirty Frag, Fragnesia, CIFSwitch and others, and it is notable for two reasons. First, it is remote and pre-auth, which most kernel bugs are not. Second, it was found independently by a human researcher at ANSSI and by an automated, AI-assisted harness at OpenSec. That second point is the bigger trend: old, rarely-reviewed kernel subsystems are now being searched at machine speed, and the 12-year “nobody looked” safety margin is disappearing. The practical lesson is the same one we see in almost every internal assessment: storage traffic that was “only on the LAN” ends up reachable from user VLANs, VPN pools or IPv6 nobody configured. Knowing exactly which services are reachable from where is what turns a critical CVE into a quiet patch window instead of an incident.
If you’d like an independent view of that, OffensioX runs internal and external penetration tests and infrastructure security assessments that map exactly this kind of exposure before an attacker does.
References
- BleepingComputer: New NFS2ROOT Linux flaw can let attackers gain root privileges
- OpenSec: NFS2ROOT (CVE-2026-99362): pre-auth root in Linux nfsd
- watchTowr: NFS2ROOT (CVE-2026-99362) FAQ
- Threat Landscape: CVE-2026-99362 NFS2ROOT Linux Kernel Analysis
- RFF: NFS2ROOT: how to check your Linux NFS server
- Tobias Weiss: Auditing an nfsd slot overflow no version scanner could find
- grep.tips: A 12-year-old flaw in Linux’s NFS server hands root to anyone on port 2049
- Ubuntu Security: CVE-2026-99362
- Red Hat Customer Portal: CVE-2026-99362
- Debian Security Tracker: CVE-2026-99362
- Linux kernel fix commit 35ff1a7a7e38