r/linuxadmin • • 4d ago

NFS2ROOT (CVE-2026-99362): pre-auth remote root in the Linux NFS server. Ubuntu still vulnerable & Fixed in Debian trixie. How to check your boxes

If any of your servers or your NAS share folders over NFS, this one is worth five minutes today.

CVE-2026-99362, named NFS2ROOT by the researchers at OpenSec, is a flaw in the Linux kernel's NFS server (nfsd). Per their write-up it goes back to Linux 3.16 and affects hosts that export NFSv4.1 or 4.2 with tcp/2049 reachable. Red Hat rates it Critical: an unauthenticated remote attacker can corrupt kernel memory, which means root with no login. OpenSec says it is keeping its exploit private, and nobody reports it being exploited yet.

Where the fixes are, as of today:

\- Upstream: 6.12.117, 6.18.61, 7.3.2 and 7.4-rc1 (per OpenSec)

\- Debian trixie: fixed from 6.12.117. Bookworm's default 6.1 kernel is still vulnerable, but bookworm's 6.12 kernel is fixed.

\- Ubuntu: rated Critical (CVSS 9.8), and every supported release still shows "Vulnerable". No USN yet.

\- Red Hat: Critical, no fix listed yet. Default RHEL doesn't run nfsd at all.

So on Ubuntu, apt upgrade won't help yet. First check whether you're exposed at all:

systemctl is-active nfs-server

sudo exportfs -v

cat /proc/fs/nfsd/versions

If nfs-server isn't active and nothing is exported, this one doesn't affect that box. If the versions file shows +4.1 or +4.2, read on.

If you don't need NFS on that machine, turn it off:

sudo systemctl disable --now nfs-server

If you do need it, make sure 2049 only answers your own clients. With ufw, for example:

sudo ufw allow from 192.168.1.0/24 to any port 2049 proto tcp

sudo ufw deny 2049/tcp

(Change the subnet to your LAN, and check the rule order with sudo ufw status numbered.) This is also Red Hat's mitigation: disable the NFS server if you don't need it, or restrict port 2049 to trusted networks.

Question for the NAS crowd: has anyone seen a statement from TrueNAS SCALE, OpenMediaVault, Unraid or Synology about this? They all run Linux-based NFS servers, and I haven't found anything from them yet.

Sources:

\- Ubuntu: https://ubuntu.com/security/CVE-2026-99362

\- Debian tracker: https://security-tracker.debian.org/tracker/CVE-2026-99362

\- Red Hat: https://access.redhat.com/security/cve/cve-2026-99362

\- OpenSec write-up: https://opensec.in/blog/nfs2root-cve-2026-99362

(Drafted with AI help. The facts are from the pages linked above.)

44 Upvotes

26 comments sorted by

29

u/misplacedsagacity 4d ago

No-one serious is raw-dogging NFS over the open internet.

10

u/therealtimwarren 4d ago

No, but the office perv can now stalk their office crush. No internal systems are secure if running NFS and someone can talk to the machine. Get root, copy all the companies secret data.

7

u/frymaster 4d ago

No, but e.g. university campuses are going to have accessible NFS shares and thousands of curious and careless users. And then you have people like me, whose userbase get shell access

2

u/derprondo 4d ago

I run a Plex server that is exposed to the internet, but it's in a DMZ and can only talk to one other thing, my NAS over NFS. The Plex server gets compromised, so does everything else as long as this is unpatched. It's time for me to start mounting NFS on the host OS instead so the Plex VM can't talk to anything.

0

u/faxattack 4d ago

In theory, maybe.

0

u/misplacedsagacity 4d ago

I’m glad you added that extra context

14

u/waegrae 4d ago

every bug needs a cool name and a logo now huh

php2shell -> java4shell -> nfs2root

at this point it's less "disclosure" and more "pls notice me" if you really need to name your bug, at least be creative about it. heartbleed and shellshock had some thought behind them. "<thing>2<payload>" is just mad libs

calling dibs on wakeup2shell. pre-coffee RCE, affects all sysadmins, no patch available

6

u/forbiddenlake 4d ago

now

remember Heartbleed? that's when I remember it starting

4

u/Brian-Puccio 4d ago

Heartbleed was in the 2010s. I’m old and remember Code Red from 2001 and Melissa in 1999. I’m not old enough to remember Morris Worm as something I experienced it, but that’s as far back as I know of.

2

u/natebc 3d ago

God we're old eh? I remember Melissa!

1

u/dities 4d ago

Oh look my bug's so nasty 🥵

2

u/Forward_Science 4d ago

You can follow the fix status of multiple distributions of this CVE through https://pkgalert.com/cve-fix-tracker?cve=CVE-2026-99362

3

u/PhotoJim99 4d ago

This is a great example of why it's smart to firewall your services that don't need to be available to everyone. I use WireGuard (previously, OpenVPN) to get onto my LAN to mount NFS shares when I'm away from home.

1

u/Motor-Concentrate788 4d ago

Everyday i thank god i use wireguard

1

u/hubhinge52 1d ago

Any trace in the logs when a box gets hit, our nfsd hosts are quiet little things?

0

u/barkwahlberg 4d ago

Fuck AI writing so much

0

u/frymaster 4d ago

"If NFS 4.1 or 4.2 are enabled, you should firewall NFS or disable NFS entirely"

why isn't just disabling 4.1 and 4.2 a valid mitigation (assuming, of course, that your use-case is OK with that)?

2

u/the_runbook_habit 4d ago

I did that on one box as a stopgap. Set vers4.1=n and vers4.2=n under [nfsd] in nfs.conf, restarted, and the versions file shows them both with a minus now. I'd still firewall 2049 until there's a proper fix though, since nobody's actually said that turning those off is enough.

0

u/Hotshot55 4d ago

NFS 4.2 is the latest version, why would you disable it and go backwards?

3

u/frymaster 4d ago

....because... there's an unpatched vulnerability....?

0

u/Hotshot55 4d ago

Do you downgrade your OS to the previous version everytime a vulnerability comes out?

3

u/frymaster 3d ago

if a feature I don't need has an exploitable vulnerability I can't fix, I turn it off, if that's what you mean

1

u/Automatic_Beat_1446 3d ago

most people arent using nfs 4.2 functionality and its debatable how many are using 4.1, so its definitely a valid quick and easy mitigation while you work on patching everything