Skip to content
Memory corruption Write-up Advanced

NFS2ROOT (CVE-2026–99362): Defender Notes on the 12-Year-Old Linux NFS Root Bug

A flaw in the Linux kernel's NFS server let an unauthenticated network client negotiate a zero-length reply cache buffer and then trigger a heap write past the end of that buffer, with client-chosen bytes, plus a read of neighbouring kernel memory back to the client. An attacker who could reach TCP port 2049 on an affected host could potentially gain root privileges.

Ali Dak Follow

Published on medium.com

I am a penetration tester (OSCP). This is a defender’s summary of CVE-2026–99362, the Linux kernel NFS server bug that OpenSec named NFS2ROOT.

Ali Dak, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

Context

CVE-2026-99362 is a vulnerability in nfsd, the NFS server built into the Linux kernel, in fs/nfsd/nfs4state.c. OpenSec named it NFS2ROOT. The bug was introduced by commit 47ee52986472 in 2014 and first shipped in Linux 3.16.

The affected feature is NFSv4.1 sessions. When a client creates a session, it tells the server how large a reply the server should keep in its replay cache, so that a retried request can be answered from the cache. Every request then starts with a SEQUENCE operation that names a slot in that session. The bug is in the server side of that negotiation and replay path, not in the client.

This is a defender's summary. The author did not find the bug and did not write an exploit for it; the material comes from the CVE record, the kernel fix, distribution trackers and the researchers' public statements.

Setup

No accounts, roles or tooling are needed to reach the vulnerable code. The attack is over the network, requires no authentication and no user interaction, and the attacker only needs to reach TCP port 2049.

A host is in scope when all of the following are true:

  1. The host runs the in-kernel NFS server, exporting at least one share.
  2. NFSv4.1 or 4.2 is enabled. Both are on by default when the server runs.
  3. Someone untrusted can reach TCP 2049 on it.
  4. The kernel predates the fix for its branch.

A machine that only mounts NFS shares as a client is not affected by this CVE. Red Hat notes that default RHEL installs do not run nfsd; the exposure is in machines set up to serve files: file servers, NAS and storage appliances built on Linux, hypervisor hosts sharing storage, and cluster nodes that export volumes. Reachable includes the internal network, so an attacker who already has a foothold inside does not need 2049 exposed to the internet.

Finding it

The bug was found twice, independently, within about five weeks:

  • 17 August 2026: Jérémy Jean of ANSSI, France's national cybersecurity agency, submitted a fix.
  • 21 September 2026: OpenSec says its automated system, Antara, flagged the same bug independently and built a working attack without human help.
  • 22 September 2026: OpenSec sent the maintainers and the Linux security team an exploit and a patch.
  • 19 November 2026: the CVE and stable kernel fixes were published.

The author's point is that a code path which sat in the kernel for twelve years was found by two parties, one of them an automated system, within about five weeks of each other. The time between nobody having noticed a bug and someone having a working exploit is getting shorter, and old code is being re-read at a scale it was not before.

Exploitation

The report describes the mechanism from the fix commit rather than walking through a live attack, so the steps below are the sequence of conditions the fix commit describes.

Step 1: negotiate the cached reply size down to the minimum

When a client creates an NFSv4.1 session, it tells the server how large a reply the server should keep in its replay cache. According to the fix commit, a client could negotiate that size down to the minimum, which gave every slot a cache buffer of zero bytes.

Step 2: send a request with a carefully sized COMPOUND tag

Every request starts with a SEQUENCE operation naming a slot in the session. A request with a carefully sized COMPOUND tag then left the server in a state where it thought the SEQUENCE operation had succeeded and copied the whole reply, including the client-chosen tag, into that zero-length buffer.

Step 3: the write and the read

The result is a write past the end of a kernel heap object, with most of the bytes chosen by the client, and a read of the neighbouring memory back to the client.

All of the operations needed to get there are allowed before the server checks any file handle or export permission. That is why the record scores it as requiring no privileges.

Root cause

The server accepted a negotiated replay-cache reply size that gave each session slot a zero-byte buffer, then copied a full reply, including the client-chosen COMPOUND tag, into that buffer after treating the SEQUENCE operation as successful. The copy is a kernel heap overflow with largely client-controlled contents, followed by an out-of-bounds read returned to the client.

The fix checks that the reply fits the negotiated limit before the server narrows the buffer and accepts the slot. The operations needed are reachable before file handle or export permission checks, which is why the CVE record scores it as requiring no privileges.

Impact

Severity is CVSS 3.1 9.8 in the CVE record. Red Hat rates it 9.4, scoring integrity impact as low. The attack is over the network with no authentication and no user interaction, and needs only TCP access to port 2049.

At the time of writing there were no reports of attacks in the wild and no CISA KEV listing, and OpenSec says it is not aware of exploitation. Public proof-of-concept code exists, so that may change. A kernel heap overflow that misses its target crashes the server.

Fix

Upstream fixes are 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. Distribution kernels carry backports, so the version number will not always match the upstream list; check the vendor tracker.

  1. Find your NFS servers across the fleet, including appliances and hypervisors that do not look like Linux servers in your inventory:
Bash
systemctl is-active nfs-server        # or nfs-kernel-server on Debian/Ubuntu
cat /proc/fs/nfsd/versions            # +4.1 +4.2 means sessions are enabled
ss -tlnp | grep 2049
  1. Install your distribution's fixed kernel and reboot. The fix lives in the kernel, so the reboot is part of the patch. Live patching is an option where your vendor supports it for this CVE.
  • Debian: fixed in trixie (6.12.117-1) and bookworm security (6.1.192-3).
  • Ubuntu: at the time of writing the tracker lists the supported LTS kernels as vulnerable with fixes in progress; check it again before planning the maintenance window.
  • Red Hat: see the CVE page and Bugzilla 2576719 for errata.
  • Appliances: follow the vendor's advisory, and do not assume a NAS updates its kernel with the rest of its software.
  1. If you cannot patch today:
  • If the machine does not need to serve NFS, stop and disable the NFS server service.
  • Otherwise, restrict TCP 2049 to the specific clients that use it. Red Hat's page shows how with a firewalld rich rule. Reloading the firewall cuts off clients that are not on the list, so build the list first.
  • The vulnerable path is the session setup introduced in NFSv4.1. Turning off 4.1 and 4.2 in /etc/nfs.conf would avoid it, but that is the author's own reading of the code path and no vendor recommends it. Many clients will fail to mount without 4.1, so test it before relying on it.
  1. Be careful with public exploits. Several GitHub repositories with this CVE number appeared within days of publication, some claiming a one-command root shell. The author has not tested them. Treat any of them as untrusted code and run them, if at all, only against lab machines you own.

Variants to test

There is no network signature for this bug. OpenSec's suggestions for host-side signals are the practical starting points:

  • Kernel warnings from nfsd4_check_resp_size.
  • Kernel oopses with nfsd4_*, svc_* or call_usermodehelper* in the stack trace.
  • Shells or other processes spawned by kernel worker threads on file servers.
  • Bursts of short NFSv4.1 sessions from a single source.

An unexplained crash or reboot of a file server since mid-November is worth a second look on its own, because a failed attempt at a kernel heap overflow usually shows up as an oops in the kernel log.

Hunting notes

During recon, the signals that point to it are an in-kernel NFS server with NFSv4.1 or 4.2 enabled and TCP 2049 reachable, including from the internal network; cat /proc/fs/nfsd/versions showing +4.1 +4.2 and ss -tlnp | grep 2049 confirming the listener are the checks the report gives.

It is a defender's summary of a publicly disclosed CVE, with the fix commit, the CVE record and the researchers' statements as its evidence.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 13 min read.

What happened, in plain words

In November 2026 a serious security flaw was made public in a piece of software that is built into Linux, the operating system that runs most of the world's servers. The flaw is called CVE-2026-99362, and a security company called OpenSec gave it the friendlier name NFS2ROOT. The name hints at what an attacker could achieve on a file server.

A CVE is simply an ID number for a publicly known security bug. Think of it like a case number at a police station: it lets everyone talk about the same issue without confusion.

The bug lives in NFS, a way for computers to share files over a network. The part that is broken is the server side, the machine that hands out the files, not the machine that reads them. The bug was introduced in 2014 and shipped in Linux 3.16, so it sat unnoticed in the code for about twelve years.

This article is a defender's summary. The author did not find the bug and did not write an exploit for it. Everything here comes from the official CVE record, the fix that was added to the Linux kernel, the pages where Linux distributions track which versions are patched, and public statements from the researchers.

The facts

Before the details, here is the short version of what is affected and how bad it is.

  • Component: nfsd, the NFS server built into the Linux kernel, in the file fs/nfsd/nfs4state.c. The kernel is the core of the operating system, the part that talks directly to the hardware and manages memory and processes. nfsd is the program inside the kernel that answers file-sharing requests.
  • Introduced: commit 47ee52986472 in 2014, first released in Linux 3.16. A commit is a saved change in a code repository, like a version in a document's history.
  • 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. "Upstream" means the main Linux project itself, before the various Linux distributions adapt it.
  • Severity: CVSS 3.1 9.8 in the CVE record. CVSS is a standard score from 0 to 10 for how serious a vulnerability is; 9.8 is near the top. Red Hat, a major Linux vendor, rates it 9.4, scoring integrity impact as low.
  • Attack: network, no authentication, no user interaction. The attacker needs to reach TCP port 2049. TCP is one of the basic ways computers send data to each other over a network. A port is like a numbered door on a machine; port 2049 is the door NFS listens on. "No authentication" means the attacker does not need a username or password.
  • Published: 19 November 2026.
  • Exploitation: at the time of writing, no reports of attacks in the wild and no CISA KEV listing. CISA is a US government cybersecurity agency, and its KEV list is a catalogue of bugs that are known to be actively exploited. OpenSec says it is not aware of exploitation.

Who is actually exposed

The bug is in the NFS server. A machine that only mounts NFS shares as a client is not affected by this CVE. "Mounting" means attaching a remote folder so it appears as a normal folder on your computer. If your machine only does that, you are a client, and this bug is not your problem.

You are in scope if all of these are true:

  1. The host runs the in-kernel NFS server, exporting at least one share. "Exporting" means offering a folder to other machines.
  2. NFSv4.1 or 4.2 is enabled. Both are on by default when the server runs. The "v4.1" and "v4.2" are versions of the NFS protocol, the agreed language the client and server use.
  3. Someone untrusted can reach TCP 2049 on it.
  4. The kernel predates the fix for your branch. A "branch" is a maintained line of kernel versions, such as 6.1 or 6.12, each with its own backported fixes.

Red Hat notes that default RHEL installs do not run nfsd. RHEL is Red Hat Enterprise Linux, a commercial Linux distribution. The exposure is in the machines that were set up to serve files: file servers, NAS and storage appliances built on Linux, hypervisor hosts sharing storage, and cluster nodes that export volumes. A NAS is a box on the network whose only job is to store files. A hypervisor is software that runs many virtual machines on one physical machine. A cluster is a group of machines working together.

"Reachable" includes your internal network. An attacker who already has one foothold inside does not need 2049 to be on the internet. In other words, if someone has already broken into one machine in your office network, they can reach the file server from there.

What went wrong

To understand the bug, you need one idea: a buffer. A buffer is a reserved patch of memory, like a fixed-size box. If you put more into the box than it can hold, the extra spills over into whatever is next to it. In a computer, that spill can overwrite other data, and that is called a buffer overflow.

NFSv4.1 introduced sessions. A session is a conversation between a client and the server. When a client creates a session, it tells the server how large a reply the server should keep in its replay cache, so that a retried request can be answered from the cache. A replay cache is like a small shelf where the server keeps recent answers, so if the network drops a reply and the client asks again, the server can hand back the same answer without redoing the work.

Every request then starts with a SEQUENCE operation that names a slot in that session. Think of a session as a row of numbered pigeonholes, one per slot, and SEQUENCE is the label saying which pigeonhole this request belongs to.

According to the fix commit, a client could negotiate the cached reply size down to the minimum, which gave every slot a cache buffer of zero bytes. A request with a carefully sized COMPOUND tag then left the server in a state where it thought the SEQUENCE operation had succeeded and copied the whole reply, including the client-chosen tag, into that zero-length buffer. A COMPOUND tag is a short label the client attaches to a request; the server is supposed to echo it back.

The result is a write past the end of a kernel heap object, with most of the bytes chosen by the client, and a read of the neighbouring memory back to the client. The heap is the area of memory a program uses for things it creates while running. Writing past the end of an object there is a heap overflow. Reading neighbouring memory and sending it back is an out-of-bounds read.

All of the operations needed to get there are allowed before the server checks any file handle or export permission. A file handle is the server's internal reference to a file. That is why the record scores it as requiring no privileges: the attacker gets to the broken code before any password or permission check happens.

The fix checks that the reply fits the negotiated limit before the server narrows the buffer and accepts the slot.

Found twice

The timeline is worth a moment, because it says something about where vulnerability research is going.

  • 17 August 2026: Jérémy Jean of ANSSI, France's national cybersecurity agency, submitted a fix.
  • 21 September 2026: OpenSec says its automated system, Antara, flagged the same bug independently and built a working attack without human help.
  • 22 September 2026: OpenSec sent the maintainers and the Linux security team an exploit and a patch. An exploit is code that actually abuses a bug. A patch is the code change that fixes it.
  • 19 November 2026: the CVE and stable kernel fixes were published.

A code path that sat in the kernel for twelve years was found by two parties, one of them an automated system, within about five weeks of each other. The lesson for defenders is practical: the time between "nobody has noticed this" and "someone has a working exploit" is getting shorter, and old code is being re-read at a scale it was not before.

What to do

1. Find your NFS servers

You cannot fix what you have not found. This step is about listing every machine that might be running the NFS server.

Bash
systemctl is-active nfs-server        # or nfs-kernel-server on Debian/Ubuntu
cat /proc/fs/nfsd/versions            # +4.1 +4.2 means sessions are enabled
ss -tlnp | grep 2049

Line by line:

  • systemctl is-active nfs-server asks the service manager whether the NFS server service is running. systemctl is the standard tool for controlling background services on most Linux systems. The comment notes that on Debian and Ubuntu the service may be called nfs-kernel-server instead.
  • cat /proc/fs/nfsd/versions prints a small file that lists which NFS versions the server supports. cat simply displays a file's contents. If you see +4.1 +4.2, the session feature that contains the bug is switched on.
  • ss -tlnp | grep 2049 lists network listeners and filters for port 2049. ss shows open network sockets, -tlnp narrows it to TCP listeners with process names, and grep 2049 keeps only the lines mentioning that port. If a line appears, something is listening on the NFS door.

Do this across the fleet, including appliances and hypervisors that do not look like "Linux servers" in your inventory. A fleet just means all the machines you are responsible for.

2. Install your distribution's fixed kernel and reboot

Distribution kernels carry backports, so the version number will not always match the upstream list. A backport is a fix taken from a newer version and applied to an older one. Check the vendor tracker:

  • Debian: fixed in trixie (6.12.117-1) and bookworm security (6.1.192-3). Debian names its releases; trixie and bookworm are two of them.
  • Ubuntu: at the time of writing, the tracker lists the supported LTS kernels as vulnerable with fixes in progress. Check it again before you plan the maintenance window. LTS means long-term support, a release kept patched for years.
  • Red Hat: see the CVE page and Bugzilla 2576719 for errata. Bugzilla is a bug-tracking system, and errata are official notices of fixes.
  • Appliances: follow the vendor's advisory. Do not assume a NAS updates its kernel with the rest of its software.

The fix lives in the kernel, so the reboot is part of the patch. Live patching is an option where your vendor supports it for this CVE. Live patching applies fixes to a running kernel without restarting.

3. If you cannot patch today

Sometimes a reboot has to wait. These are the temporary measures.

  • If the machine does not need to serve NFS, stop and disable the NFS server service. Turning off a feature you do not use removes the risk entirely.
  • Otherwise, restrict TCP 2049 to the specific clients that use it. Red Hat's page shows how with a firewalld rich rule. firewalld is a firewall tool, and a rich rule is a detailed rule that allows only certain sources. Reloading the firewall cuts off clients that are not on the list, so build the list first.
  • The vulnerable path is the session setup introduced in NFSv4.1. Turning off 4.1 and 4.2 in /etc/nfs.conf would avoid it, but that is my own reading of the code path and no vendor recommends it. Many clients will fail to mount without 4.1. Test it before relying on it.

4. Be careful with public "exploits"

Several GitHub repositories with this CVE number appeared within days of publication, some claiming a one-command root shell. GitHub is a website where people share code. A root shell is a command prompt with the highest level of control on the machine. I have not tested them. Treat any of them as untrusted code and run them, if at all, only against lab machines you own. A kernel heap overflow that misses its target crashes the server.

What to look for

There is no network signature. A network signature is a pattern in network traffic that a monitoring tool could match. Because there is none, you have to look on the machines themselves. OpenSec's suggestions for host-side signals:

  • Kernel warnings from nfsd4_check_resp_size. This is a function in the kernel that checks reply sizes; a warning from it is a hint that something odd happened.
  • Kernel oopses with nfsd4_*, svc_* or call_usermodehelper* in the stack trace. An oops is the kernel reporting that it hit an internal error. A stack trace is the list of functions that were running when it happened.
  • Shells or other processes spawned by kernel worker threads on file servers. A process is a running program, and a thread is a smaller unit of work inside it.
  • Bursts of short NFSv4.1 sessions from a single source. Many quick sessions from one place can be a sign of automated probing.

An unexplained crash or reboot of a file server since mid-November is worth a second look on its own. A failed attempt at a kernel heap overflow usually shows up as an oops in the kernel log.

Summary

  • Affects Linux hosts serving NFSv4.1/4.2, from kernel 3.16 onwards.
  • No authentication needed, only access to TCP 2049, and that includes your internal network.
  • Patch the kernel and reboot. Until then, restrict 2049 to known clients or turn the server off.
  • Not known to be exploited yet. Public PoC code exists, so that may change. PoC means proof of concept, code that demonstrates the bug works.

Glossary

  • ANSSI: France's national cybersecurity agency.
  • Backport: a fix taken from a newer software version and applied to an older one.
  • Branch: a maintained line of software versions, such as 6.1 or 6.12.
  • Buffer: a reserved patch of memory, like a fixed-size box.
  • Buffer overflow: writing more data into a buffer than it can hold, so the extra spills into neighbouring memory.
  • Bugzilla: a bug-tracking system used by projects and vendors.
  • CISA: a US government cybersecurity agency.
  • Client: a machine that asks another machine for a service, such as reading a shared folder.
  • Cluster: a group of machines working together.
  • Commit: a saved change in a code repository.
  • COMPOUND tag: a short label a client attaches to an NFS request, which the server echoes back.
  • CVE: a public ID number for a known security vulnerability.
  • CVSS: a standard 0 to 10 score for the severity of a vulnerability.
  • Debian: a Linux distribution, with releases named trixie and bookworm.
  • Errata: official notices of fixes published by a vendor.
  • Exploit: code that abuses a vulnerability.
  • Export: to offer a folder from an NFS server to other machines.
  • File handle: the server's internal reference to a file.
  • firewalld: a firewall management tool on Linux.
  • Fleet: all the machines an organisation is responsible for.
  • GitHub: a website where people share and collaborate on code.
  • Heap: the area of memory a program uses for things it creates while running.
  • Heap overflow: writing past the end of an object in the heap.
  • Hypervisor: software that runs many virtual machines on one physical machine.
  • Kernel: the core of an operating system, managing hardware, memory and processes.
  • KEV: CISA's catalogue of vulnerabilities known to be actively exploited.
  • Live patching: applying fixes to a running kernel without restarting.
  • LTS: long-term support, a release kept patched for years.
  • Mount: to attach a remote folder so it appears as a normal folder locally.
  • NAS: a network storage box whose job is to store files.
  • Network signature: a pattern in network traffic that monitoring tools can match.
  • NFS: a protocol for sharing files over a network.
  • nfsd: the NFS server built into the Linux kernel.
  • Oops: the kernel reporting that it hit an internal error.
  • Out-of-bounds read: reading memory outside the intended area, which can leak data.
  • Patch: a code change that fixes a vulnerability.
  • PoC: proof of concept, code that demonstrates a vulnerability works.
  • Port: a numbered door on a machine that network traffic can use; NFS uses 2049.
  • Process: a running program.
  • Replay cache: a small store of recent replies so a retried request can be answered without redoing the work.
  • RHEL: Red Hat Enterprise Linux, a commercial Linux distribution.
  • Rich rule: a detailed firewall rule that allows only certain sources.
  • Root shell: a command prompt with the highest level of control on a machine.
  • SEQUENCE: the NFS operation that starts each request and names a session slot.
  • Server: a machine that provides a service to other machines.
  • Session: a conversation between a client and a server in NFSv4.1 and later.
  • Share: a folder offered by an NFS server.
  • Stack trace: the list of functions that were running when an error happened.
  • TCP: a basic way computers send data to each other over a network.
  • Thread: a smaller unit of work inside a process.
  • Upstream: the main project itself, before distributions adapt it.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.