How can I check whether my NFS server is exposed to NFS2ROOT?

November 27, 2026 4 answers
Asked by 4c~gobletstaple_731

I saw a report about CVE-2026-99362, a Linux NFS server flaw that could allow unauthenticated remote root access. How can I check which machines are exposed, and what should I do while waiting for a vendor fix?

Answers

q.536+zunquari

Start by checking whether the machine actually serves NFS. On systems using systemd, check systemctl is-active nfs-server and run sudo exportfs -v to see exports. Service names and management tools can differ on NAS appliances, so check their own settings too.

The report identifies NFSv4.1 and 4.2 as affected. Check cat /proc/fs/nfsd/versions for +4.1 or +4.2, then check which networks can reach TCP port 2049. A client-only machine is not an NFS server just because it mounts a share.

Zavtori-3m:

Check from the network as well as looking at local settings. A firewall or network policy may limit reachability even when the service is listening.

Reply to this answer
_a85!quendari.3

If you don't need the server, stop and disable it. On a system with the nfs-server service, sudo systemctl disable --now nfs-server is one way to do that.

If you do need it, restrict TCP port 2049 to trusted clients or networks and verify the firewall rule order. That reduces exposure, but it doesn't fix the kernel flaw, and an attacker on an allowed network could still reach the service.

Daxie:

For access from outside the network, a VPN is an alternative to exposing NFS directly. The NFS port should still be restricted to the clients that need it.

Reply to this answer
Nimvori-7c

Check your vendor's current advisory for the exact kernel package and release you run. The report listed fixes in several upstream kernel branches and for Debian's 6.12 kernel, but vendor kernels can differ from upstream version numbering.

The supplied reports disagreed on fix status over time: one said no Red Hat fix was listed, while a later comment reported a RHEL 8 fix. Ubuntu was reported as vulnerable at the time of the original post. Don't assume either status is current. Install the appropriate vendor update when available and verify that the fixed kernel is running after reboot.

Reply to this answer
Tivnaro+8k

For a NAS, check the appliance vendor's advisory and installed software version rather than assuming a general Linux distribution's fix applies. The discussion didn't establish fix status for specific NAS products. Until you can verify it, disable NFS if unused or limit access to trusted clients.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions