Next.js apps lost 50,000+ API keys: what to check and rotate
An automated campaign used an old Next.js flaw to steal cloud, AI and database keys. If your app runs Next.js, update it and rotate every secret today.
If your SaaS or website runs on Next.js and you haven't updated it since December 2025, assume its keys are stolen. On November 30, 2026, the security firm CloudSEK described a campaign it calls React2Keys. It took more than 50,000 credentials from over 19,000 victims at more than 400 organizations, including "both enterprise and small-business infrastructure".
Do four things today: update React and Next.js, rotate every key the server could read, look for an unknown SSH key on the server, and check your cloud and AI bills for use you didn't make. Updating alone isn't enough, because stolen keys keep working after the patch.
What happened
The attackers used React2Shell (CVE-2025-55182), a flaw in React Server Components that lets anyone run code on the server with one request and no login. React rates it CVSS 10.0 and fixed it on December 3, 2025. CISA added it to its catalog of flaws exploited in real attacks on December 5, 2025. The campaign went after the servers that never got the fix.
CloudSEK says it got into the attackers' own infrastructure and mapped the whole operation. BleepingComputer reports that it ran for ten days, from November 9 to 19, 2026. Here is what CloudSEK found:
- New sites were found within minutes. The attackers checked public certificate logs every three minutes, so a site with a fresh HTTPS certificate became a target almost at once.
- Every secret on the server was read, including environment variables,
.envfiles, cloud credential files and SSH keys. - The attackers went deeper. They opened live connections to the victims' databases, copied git repositories with their full history, and tested stolen AI keys against about ten AI providers. With stolen Claude Code logins, they ran AI requests billed to the victim's subscription.
- They left a way back in by adding their own SSH key to the server, so, in CloudSEK's words, "patching does not remove access".
CloudSEK's public exposure page, checked on December 1, 2026, lists Brazil first among the countries in its data, at 22.9%.
Am I affected?
Your app is at risk if it uses the Next.js App Router on Next.js 15.x or 16.x, or a 14.3 canary release, and wasn't updated after December 3, 2025. Next.js 13.x, 14.x stable, Pages Router apps and the Edge Runtime are not affected. Other frameworks that use React Server Components are listed in React's advisory.
Run this in your project folder to see the versions you have:
npm ls next react-server-dom-webpack
CloudSEK also has a public exposure checker where you enter a domain. It shows only exposure details and credential names, never the secret values.
What to do now
Update to the latest release of your line. React's advisory, updated on January 26, 2026 for later flaws, lists 15.0.8, 15.1.12, 15.2.9, 15.3.9, 15.4.11, 15.5.10, 16.0.11 and 16.1.5. React's own packages are fixed in 19.0.1, 19.1.2 and 19.2.1.
Rotate every secret the server could read. That means cloud keys, AI provider keys, database passwords, payment keys, email (SMTP) logins, your domain registrar token, and the login to any secrets manager. Create the new key, deploy it, then revoke the old one.
Check for the attackers' SSH key. Open every
~/.ssh/authorized_keysfile on the server and remove any key you don't recognize. CloudSEK publishes the exact key this campaign plants; this command searches for it:grep -rl "AAAAC3NzaC1lZDI1NTE5AAAAINiNfAw552VRo+E3mBu/MHaVsRDcN0BMGuVCjgIyHbb3" /root/.ssh /home/*/.ssh 2>/dev/nullLook for other traces. Review cron jobs (
crontab -lfor each user) and recent SSH logins.Check your bills and logs. Look at your cloud account's activity log, your AI providers' usage pages and your payment dashboard for calls, new users or charges you didn't make.
Review your code host. The attackers copied repositories with their history, so any password or key ever committed should be rotated too.
If your database held customer data and you find signs of access, Brazil's data protection law (LGPD) may require you to notify the ANPD and the people affected (article 48).
Limit the damage next time
The same lesson as in the npm and Go packages that stole developer credentials applies here: a key the server can read is a key an attacker can read.
- Give each app only the keys it needs, with the smallest permissions that work. In CloudSEK's report, an app that could read a secrets manager's login gave the attackers every secret stored there.
- Set spending limits on cloud and AI accounts, so a stolen key can't run up an open-ended bill.
- Run the app as a non-root user and don't share one server across many apps, as CloudSEK recommends.
- Update within days of a critical fix. Our post on how often to scan your website explains why the gap between a patch and your update matters.
How Volturion helps
Volturion's web scan checks your site for known critical flaws, including those on CISA's exploited list, and confirms each one against the live site before it alerts you. On the Builder and Business plans it runs by itself every week, so a missed update doesn't go unnoticed for months. The scan also reads the JavaScript your site serves and alerts you when it finds a credential there. Connect your code repositories and Volturion looks for passwords and keys left in the code and its history.
Volturion can't see your server's environment variables or an SSH key on the server, and it doesn't watch your cloud or AI bills, so steps 2 to 5 above stay with you. Create your account and add your domain: it takes less than five minutes.