r/StopBadBots • • 3d ago

Running a Linux server for your site? Patch this NFS flaw (CVE-2026-99362) before bots own your root.

Heads up, folks—there's a massive, 12-year-old critical flaw in the Linux kernel's NFS server (CVE-2026-99362), and it's bad news. Dubbed NFS2ROOT, it basically lets remote attackers hijack your box and get full root access out of nowhere.

It's been hiding in plain sight since kernel 3.16 back in 2014. Basically, it's a nasty heap buffer overflow in nfsd. If you're running an older kernel (anything before 6.12.117, 6.18.61, 7.3.2, or 7.4-rc1) with nfsd 4.1 or 4.2 active and port 2049 exposed to the web, you're wide open. Attackers don't even need credentials or user interaction—they just send a rigged request, mess with the kernel memory, bypass KASLR, and boom: once they drop the connection, their malicious command runs straight as root.

Look, even though we haven't seen this exploited in the wild yet, don't sleep on it. Patch your kernels ASAP and make sure you actually reboot so the fix kicks in.

Can't patch right now? Lock down TCP port 2049 to trusted IPs only, or just kill the nfs-server service in /etc/nfs.conf if you don't need it. Like OpenSec put it, kernel hardening won't save you from this overflow—you've gotta patch every single host. Keep an eye on your logs for weird nfsd4_check_resp_size warnings, random shells spawning from kernel workers, or sudden spikes in short NFSv4.1 sessions.

19 Upvotes

18 comments sorted by

5

u/No_Illustrator5035 3d ago

Why would you ever expose port 2049 to the Internet?

2

u/ha11oga11o 2d ago edited 2d ago

Hang on, all this fuss is just if someone port forwarded nfs to public ip? I mean, ppl do stuff, but even i would not as n00b.

1

u/Deep_Mood_7668 2d ago

Why wouldn't I? I don't use NFS.

1

u/runnercola 2d ago

Thankfully, I don’t think anyone ever would at least not knowingly. It would be damn near negligent to do so on any sort of production machine and NFS doesn’t exactly work well with latency so there’s really no good reason. And now we have an another good reason not to.

1

u/diet_fat_bacon 2d ago

Buy a vps on hetzner... forget to setup a proper firewall and just like that....

1

u/jared555 4h ago

I can't remember for sure with Hetzner but some providers block ports like that by default

3

u/runnercola 3d ago

Exploit or no, it’s a bad idea to expose NFS traffic to the internet in general…. Not surprised there is no exploit in the wild - as hopefully very few people actually have nfs exposed over the web.

3

u/pbrutsche 2d ago

No one in their right mind would expose NFS over the internet. But you patch this for the same reason you patch your hypervisor stack - it will give an attacker the keys to your kingdom once they have an unprivileged foothold in your network.

1

u/graph_worlok 1d ago

Actually, I see it used for IoT botnet payload hosting.. and that’s it.

1

u/semtexfree 2d ago

Most likely chances of success with this one will be if you are aready inside the LAN. Usually, public facing NFS servers will have rules that allows only a set of IPs to access it, and most of them won't expose any shares available.

1

u/graph_worlok 1d ago

Anybody who is actually running NFS and has the module loaded has gone out of their way to do so, lol.

1

u/ledow 1d ago

"and port 2049 exposed to the web"

If you're doing that, turn off your machine, quit your job if it's IT-related, and NEVER return to the industry EVER AGAIN.

0

u/Takeoded 3d ago

It's practically negligent to not run daily automated updates, with automatic on-demand reboots, these days. My server fleet does this every 1AM.

2

u/b3542 2d ago

Yeah, no. Unless you’re running clustered services, no automatic reboots for anything in production.

1

u/[deleted] 1d ago

[removed] — view removed comment

1

u/AutoModerator 1d ago

Your post/comment has been removed for violating Rule 1: No harassment, hate speech, or toxic behavior. Treat all contributors and members with kindness.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.