A critical vulnerability in the Linux kernel's Network File System (NFS) server implementation — tracked as CVE-2026-99362 and dubbed NFS2ROOT — allows remote attackers to escalate to root privileges on vulnerable systems. What makes this disclosure particularly sobering is the age of the bug: the vulnerable code has been sitting in the kernel for roughly 12 years, meaning a vast installed base of enterprise Linux systems — file servers, NAS appliances, HPC clusters, backup infrastructure, and virtualization storage backends — has been silently exposed.
NFS is one of those services that tends to be "set and forget." It gets stood up to share storage, gets an entry in /etc/exports, and then runs for years without anyone reviewing it. That's exactly the kind of asset attackers prize: internet- or intranet-reachable, running in kernel context, and rarely monitored. Because exploitation targets the kernel's NFS server (nfsd), a successful attack doesn't just compromise an application — it hands the attacker ring 0, from which they control everything: credential stores, encryption keys, lateral movement into every client that mounts the share, and persistence that survives userland forensics.
If you operate any Linux system with the NFS server enabled — even internally — this is a patch-and-verify-now situation, not a "queue it for next month's window" situation.
Technical Analysis
Affected Component and Platforms
- Component: Linux kernel NFS server (
nfsd, the in-kernel NFS daemon — not the userspace NFS-Ganesha implementation) - Vulnerability class: Memory corruption in the NFS server code path, reachable by a remote client able to send requests to the NFS service (TCP/UDP 2049)
- Age: The flawed code has been present for approximately 12 years, meaning virtually all currently supported and many end-of-life kernel branches carry the defect until patched
- Impact: Remote privilege escalation to root — full kernel-level compromise of the NFS server host
- CVE: CVE-2026-99362, rated Critical per the public disclosure
The practical blast radius is enormous. NFS servers are everywhere: /home directory servers, Kubernetes persistent volume backends (many nfs-subdir-external-provisioner deployments point at Linux nfsd hosts), VMware ESXi datastores backed by Linux NFS, media/render farms, and departmental file shares. Any host running rpc.nfsd with an export reachable by an attacker-controlled client is in scope.
How the Attack Works (Defender's View)
From a defensive standpoint, the exploitation chain matters more than the byte-level bug details:
- Reachability: The attacker needs network access to the NFS service (port 2049, and in legacy NFSv3 deployments, the associated rpcbind/mountd/statd ports — 111 and dynamically assigned ports). Crucially, this does not require internet exposure — an attacker with any internal foothold (phished workstation, compromised container, rogue IoT device) can reach flat-network NFS servers.
- Malformed request: The attacker sends specially crafted NFS RPC traffic to the kernel's
nfsdhandler, triggering the memory corruption in the vulnerable code path. - Kernel-context code execution / privilege escalation: Because
nfsdruns in kernel space, successful exploitation yields root-equivalent control of the host without ever touching a userspace SUID binary or sudo misconfiguration. - Post-exploitation: Typical follow-on behavior includes spawning a root shell (often observable as a shell or utility process descending from
nfsd/kthread context), loading a kernel module or eBPF program for stealth, harvesting credentials, and pivoting to NFS clients — which trust the server implicitly.
Exploitation Status
This is a fresh public disclosure with the vulnerability now documented and named, which historically compresses the timeline to weaponization dramatically — kernel NFS bugs attract both ransomware operators and APT actors because of the direct path to storage infrastructure. Treat CVE-2026-99362 as imminently exploitable: assume PoC code will circulate (or already does privately) and prioritize remediation accordingly. Check your distribution's security tracker and the CISA Known Exploited Vulnerabilities catalog for active-exploitation confirmation as the situation develops.
Detection & Response
Kernel-level exploitation is hard to detect during the corruption itself, but the post-exploitation behavior is highly observable. The strongest signal: nfsd (or its kernel threads) spawning userspace processes, especially shells. Legitimate nfsd operation never spawns /bin/sh, bash, curl, python, or compilers. A second strong signal is unexpected inbound connections to port 2049 from hosts that have no business mounting your exports.
Sigma Rules
---
title: NFS Kernel Daemon Spawning Suspicious Child Process
id: 9f2a7c41-3b8e-4d51-a6f2-cve202699362
status: experimental
description: Detects shells, interpreters, or download utilities spawned as children of the Linux NFS kernel daemon (nfsd), a strong post-exploitation indicator for CVE-2026-99362 (NFS2ROOT) remote root compromise.
references:
- https://www.bleepingcomputer.com/news/security/new-nfs2root-linux-flaw-can-let-attackers-gain-root-privileges/
author: Security Arsenal
date: 2026/04/06
tags:
- attack.privilege_escalation
- attack.execution
- attack.t1068
logsource:
category: process_creation
product: linux
detection:
selection_parent:
ParentImage|endswith:
- '/nfsd'
- '/rpc.nfsd'
selection_child:
Image|endswith:
- '/sh'
- '/bash'
- '/dash'
- '/zsh'
- '/python'
- '/python3'
- '/perl'
- '/curl'
- '/wget'
- '/nc'
- '/ncat'
- '/socat'
condition: selection_parent and selection_child
falsepositives:
- Extremely rare; custom monitoring wrappers invoking tools from nfsd context should be investigated rather than whitelisted
level: critical
---
title: New Root Shell Process Without Authentication Session
id: 4e1b8d26-7a3f-4c59-b2d8-cve202699362b
status: experimental
description: Detects interactive shells running as UID 0 where the parent is a kernel thread or network service rather than a login/sshd/sudo session, consistent with kernel exploit post-exploitation such as CVE-2026-99362.
references:
- https://www.bleepingcomputer.com/news/security/new-nfs2root-linux-flaw-can-let-attackers-gain-root-privileges/
author: Security Arsenal
date: 2026/04/06
tags:
- attack.privilege_escalation
- attack.t1068
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith:
- '/bash'
- '/sh'
- '/dash'
- '/zsh'
filter_legit_parents:
ParentImage|endswith:
- '/sshd'
- '/sudo'
- '/su'
- '/login'
- '/bash'
- '/zsh'
- '/sh'
- '/tmux'
- '/screen'
- '/systemd'
- '/cron'
- '/crond'
condition: selection and not filter_legit_parents
falsepositives:
- Configuration management (Ansible, Salt) executing shells; tune with known CM parent processes
level: high
---
title: Inbound NFS Connection From Unexpected Source
id: 6c4d91a7-2f58-4e63-a1b9-cve202699362c
status: experimental
description: Flags network connections to the NFS service port from sources outside expected client ranges. Establishes the reachability precondition for CVE-2026-99362 exploitation. Populate Known_Clients with authorized NFS client subnets before deploying.
references:
- https://www.bleepingcomputer.com/news/security/new-nfs2root-linux-flaw-can-let-attackers-gain-root-privileges/
author: Security Arsenal
date: 2026/04/06
tags:
- attack.initial_access
- attack.t1190
logsource:
category: network_connection
product: linux
detection:
selection:
DestinationPort: 2049
Initiated: 'false'
filter_known:
SourceIp|cidr:
- '10.0.0.0/8'
condition: selection and not filter_known
falsepositives:
- New NFS clients not yet added to the allowlist; use this rule to enforce your export inventory
level: medium
KQL — Microsoft Sentinel / Defender
This query hunts Syslog/auditd-ingested Linux telemetry in Sentinel for the core post-exploitation signal — nfsd or kernel threads spawning shells and tooling — plus anomalous inbound NFS traffic:
// NFS2ROOT (CVE-2026-99362) hunt: nfsd spawning userspace tools + anomalous NFS traffic
let SuspiciousChildren = dynamic(["sh","bash","dash","zsh","python","python3","perl","curl","wget","nc","ncat","socat","gcc","cc"]);
union isfuzzy=true
(Syslog
| where TimeGenerated > ago(7d)
| where SyslogMessage has "nfsd" and SyslogMessage has_any (SuspiciousChildren)
| extend Indicator = "Syslog: nfsd associated with suspicious process"
| project TimeGenerated, Computer, ProcessName, SyslogMessage, Indicator),
(DeviceProcessEvents
| where TimeGenerated > ago(7d)
| where InitiatingProcessFileName has_any ("nfsd", "rpc.nfsd")
or InitiatingProcessCommandLine has "nfsd"
| where FileName has_any (SuspiciousChildren)
| extend Indicator = "MDE: shell/interpreter child of nfsd"
| project TimeGenerated, DeviceName, FileName, ProcessCommandLine, InitiatingProcessFileName, AccountName, Indicator),
(CommonSecurityLog
| where TimeGenerated > ago(7d)
| where DestinationPort == 2049
| extend Indicator = "Netflow/CEF: inbound NFS connection"
| summarize ConnectionCount = count(), Clients = make_set(SourceIP, 25) by DestinationIP, DestinationPort, bin(TimeGenerated, 1h), Indicator
| where ConnectionCount > 5 or array_length(Clients) > 3)
| order by TimeGenerated desc
Velociraptor VQL
This hunt artifact enumerates processes whose parentage traces to nfsd, checks for listening NFS services, and surfaces recently created setuid binaries — a common persistence artifact after root compromise:
-- NFS2ROOT post-exploitation hunt: nfsd descendants, NFS listeners, new SUID files
LET nfsd_pids = SELECT Pid FROM pslist() WHERE Name =~ '(?i)nfsd'
LET suspicious_procs = SELECT Pid, Ppid, Name, Exe, CommandLine, Username, CreateTime
FROM pslist()
WHERE Ppid IN nfsd_pids.Pid
OR (Username =~ 'root' AND Name =~ '(?i)(bash|sh|dash|python|perl|nc|ncat|socat)$'
AND CreateTime > now() - 604800)
SELECT * FROM suspicious_procs
UNION ALL
SELECT Pid, Ppid, Name, Exe, CommandLine, Username, CreateTime
FROM netstat()
WHERE Laddr.Port = 2049 AND State = 'LISTEN'
UNION ALL
SELECT Pid = 0 AS Pid, Ppid = 0 AS Ppid, Name = 'SUID_FILE' AS Name,
FullPath AS Exe, Mode AS CommandLine, Mtime AS Username, Mtime AS CreateTime
FROM glob(globs=['/usr/bin/*','/usr/sbin/*','/bin/*','/sbin/*','/tmp/*','/var/tmp/*','/dev/shm/*'])
WHERE Mode =~ '^.{2}s' AND Mtime > now() - 604800
Remediation & Verification Script
The following Bash script inventories exposure, applies kernel updates, restricts NFS to authorized clients via firewall, and verifies the service posture. Run it (adapted to your firewall tooling) on every Linux host, prioritizing anything reachable from untrusted segments:
#!/usr/bin/env bash
# CVE-2026-99362 (NFS2ROOT) - exposure check, patch, and hardening
# Test with care in a maintenance window; kernel updates require reboot.
set -euo pipefail
echo "=== [1] Exposure inventory ==="
if systemctl is-active --quiet nfs-server 2>/dev/null || pgrep -x nfsd >/dev/null; then
echo "[!] NFS server is RUNNING on this host"
ss -tlnp | grep -E ':2049' || true
echo "--- Current exports ---"
cat /etc/exports 2>/dev/null || echo "(no /etc/exports)"
exportfs -v 2>/dev/null || true
else
echo "[+] nfsd not running - verify the nfs-server unit is disabled:"
systemctl is-enabled nfs-server 2>/dev/null || echo " nfs-server not enabled"
fi
echo
echo "=== [2] Kernel version (compare against your distro advisory for CVE-2026-99362) ==="
uname -r
echo
echo "=== [3] Apply kernel security updates ==="
if command -v apt-get >/dev/null; then
apt-get update && apt-get install --only-upgrade linux-image-$(uname -r) linux-headers-$(uname -r) 2>/dev/null \
|| apt-get dist-upgrade -y
elif command -v dnf >/dev/null; then
dnf update -y kernel kernel-core kernel-modules
elif command -v zypper >/dev/null; then
zypper refresh && zypper update -y kernel-default
fi
echo "[!] A reboot into the updated kernel is REQUIRED - kernel patches do not apply live without kpatch/kGraft."
echo
echo "=== [4] If NFS is not required, disable it ==="
# Uncomment to disable:
# systemctl stop nfs-server rpcbind && systemctl disable nfs-server rpcbind
echo
echo "=== [5] Restrict NFS to authorized clients (adjust CIDR) ==="
AUTHORIZED_NET="10.20.0.0/16"
if command -v firewall-cmd >/dev/null; then
firewall-cmd --permanent --remove-service=nfs 2>/dev/null || true
firewall-cmd --permanent --new-zone=nfs-clients 2>/dev/null || true
firewall-cmd --permanent --zone=nfs-clients --add-source="$AUTHORIZED_NET"
firewall-cmd --permanent --zone=nfs-clients --add-port=2049/tcp
firewall-cmd --permanent --zone=nfs-clients --add-port=2049/udp
firewall-cmd --reload
elif command -v iptables >/dev/null; then
iptables -A INPUT -p tcp --dport 2049 -s "$AUTHORIZED_NET" -j ACCEPT
iptables -A INPUT -p udp --dport 2049 -s "$AUTHORIZED_NET" -j ACCEPT
iptables -A INPUT -p tcp --dport 2049 -j DROP
iptables -A INPUT -p udp --dport 2049 -j DROP
fi
echo
echo "=== [6] Tighten exports ==="
echo " - Export only to specific hosts/subnets (never '*' or world-readable)"
echo " - Use 'root_squash' (default) - NEVER 'no_root_squash'"
echo " - Prefer NFSv4 only: set RPCNFSDARGS / disable v2/v3 in /etc/nfs.conf"
echo " - Add 'sec=krb5p' where Kerberos is available"
echo
echo "=== [7] Post-patch verification ==="
echo "After reboot: uname -r # confirm new kernel"
echo "After reboot: journalctl -k | grep -i nfs | head -20 # confirm clean nfsd startup"
echo "Hunt for pre-patch compromise: check for shells parented to nfsd, new SUID files, unexpected kmod loads (lsmod vs baseline)."
Remediation
1. Patch the kernel — this is the only complete fix. Update to the kernel release your distribution designates as resolving CVE-2026-99362 and reboot. Track your vendor's advisory directly: the upstream kernel advisories at kernel.org, Red Hat, Ubuntu Security Notices, SUSE, Debian Security Tracker, and Amazon Linux / Oracle Linux bulletins. Do not rely on live-patching alone unless your vendor explicitly ships a kpatch/kGraft module covering this CVE.
2. Inventory every NFS server now. Most organizations cannot answer "where is nfsd running?" within an hour. Scan for listening 2049/tcp+udp across all segments (nmap -p 2049 --open -sU -sT <ranges>), check cloud security groups and VPC firewall rules, and audit Kubernetes clusters for NFS-backed persistent volumes pointing at self-managed Linux servers. Include appliances and NAS devices — many run embedded Linux kernels that will lag on patches.
3. Kill what you don't need. If the host doesn't require NFS serving, systemctl disable --now nfs-server rpcbind and remove the kernel modules from the attack surface. Every disabled service is a CVE that can't reach you.
4. Segment aggressively. NFS should never be reachable from user VLANs, guest networks, or the internet. Enforce host-level firewalls (per the script above) and network ACLs restricting 2049 (plus 111/rpcbind and mountd ports for legacy v3) to explicitly authorized storage clients. The vulnerability is remote — removing reachability removes the threat until you can patch.
5. Harden surviving exports. NFSv4-only, root_squash enforced (audit for any no_root_squash — it's a pre-existing root-equivalent exposure), exports scoped to specific subnets, and Kerberos (sec=krb5p) where feasible.
6. Hunt before you assume clean. A 12-year-old bug means unknown exposure duration. Run the detections above across your fleet covering at least the last 30–90 days of retained telemetry: shells descending from nfsd, anomalous 2049 connections, unexpected kernel module loads (lsmod vs. baseline), new SUID binaries, and unplanned cron/systemd persistence on NFS servers. If you find indicators, treat it as a kernel-level compromise — full IR engagement, credential rotation for anything that touched the host, and rebuild from known-good media rather than in-place cleaning.
7. Monitor for exploitation confirmation. Watch the CISA KEV catalog and your distro tracker. If CVE-2026-99362 lands in KEV, federal deadlines will follow and any unpatched exposure becomes an incident-response scenario, not a vulnerability-management one.
The uncomfortable lesson of NFS2ROOT is one we've seen with every long-lived kernel bug: dwell time beats sophistication. Attackers didn't need a zero-day for twelve years — they needed defenders to forget that an unmonitored, unsegmented kernel service was listening. Patch fast, segment ruthlessly, and start watching nfsd like the root shell it can become.
Related Resources
Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub
Is your security operations ready?
Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.