A Next.js vulnerability gave attackers root on my server
· 1 min read
A critical vulnerability in Next.js, CVE-2025-66478, recently gave attackers root access to my server.
The flaw allowed unauthorized code execution at root level. The attackers then installed several stealthy persistence mechanisms: cron jobs, shell profile changes and a hash binary.
I don’t usually use Next.js. I was running Umami, a web analytics tool whose front end is built with it.
How I found out
The only reason I caught this early is that the Hetzner network abuse team flagged unusual outbound scanning from the server and sent me a detailed email alert.
The fix
Once a system is compromised at this level, patching and hoping is not enough.
To be sure of the server’s integrity, I wiped it completely and rebuilt it, then deployed the patched Next.js version straight away.
What you should do
Check your personal and company projects, then mitigate and audit immediately. Make sure all Next.js and React dependencies are updated to the secure version.