A flaw in the Linux kernel's file-sharing server can let a remote attacker take full control of some machines. The NFS2ROOT vulnerability affects the Network File System, or NFS, which lets computers access files across a network.
The bug has been in the kernel since version 3.16, released in March 2014. But its age alone doesn't put every Linux computer at risk. The server must be running a vulnerable kernel, have the relevant NFS service active, and allow connections to TCP port 2049 from the internet.
That combination matters because a machine can be running Linux without exposing this file-sharing service online. The cutoff depends on the kernel branch: kernels before 6.12.117 in the 6.12 series, before 6.18.61 in the 6.18 series, before 7.3.2 in the 7.3 series, or before 7.4-rc1. NFS versions 4.1 or 4.2 must also be loaded and running.
Here's how the attack works: a specially formed request makes the server write past the end of a memory area set aside for it. The attacker can then read kernel memory, get past a protection that hides memory addresses, and place a command where the kernel can run it.
When the attacker closes the NFS connection, the kernel runs that command with root privileges. Root is the highest level of access on the machine, so this means control of the vulnerable server, not just access to one shared file.
For anyone whose files or services are on one of these servers, the concern is the machine that hosts them. You may not manage that system yourself, but its operators can install the latest kernel security update from their Linux distributor and reboot to start using the patched kernel.
There are no reported attacks using this flaw in the wild. Administrators who can't patch right away can limit NFS access to trusted networks; when file sharing isn't needed, they can stop and disable the NFS server service.
A server is exposed only when it runs an affected kernel with NFS 4.1 or 4.2 active and port 2049 reachable online. Operators can use those checks to decide which servers need the update first.
















