Patching a vulnerability does not mean you are safe. That is the most worrying lesson of React2Keys, an automated credential-theft campaign uncovered by CloudSEK and reported by BleepingComputer on 1 December 2026. The attacker exploited the React2Shell flaw on unpatched Next.js servers, then walked away with cloud keys, AI API keys and database passwords. If your app ever ran an unpatched version, upgrading is only the first step.

What React2Keys stole, and from where

According to the report, the campaign took more than 50,000 credentials from at least 19,000 hosts across 400 organisations. Researchers gained access to the attacker's infrastructure and recovered an exfiltration log of 1.9 million lines plus a toolkit of over 900,000 files. The activity window was ten days, from 9 to 19 November.

The flaw is React2Shell (CVE-2025-55182), an unauthenticated remote code execution bug in React Server Components. Next.js tracks its downstream impact as CVE-2025-66478, announced on 3 December 2025 with a CVSS score of 10.0. In plain terms, a single crafted request is enough to run code on an unpatched server.

Targets were picked minutes after a TLS certificate was issued

What sets this campaign apart is how it chose victims. The attacker polled six public Certificate Transparency logs every three minutes, so a freshly issued TLS certificate could turn a domain into a scan target within minutes of deployment.

Practically, there is no such thing as a new site nobody knows about. Staging and test environments on real domains are within scanning range too. Only about 3% of scanned domains were identified as Next.js, but at automated scale, that is still a very large number.

The list of secrets the attacker went after

CloudSEK lists these categories:

  • AWS access keys and temporary session credentials, Azure managed-identity tokens, Google Cloud service-account keys;
  • Anthropic, OpenAI and Google Gemini API keys, plus Claude Code OAuth tokens;
  • GitHub access tokens;
  • PostgreSQL, Redis and MongoDB credentials;
  • cryptocurrency exchange API keys and wallet keys.

After collecting them, the attacker tested whether each key was still valid and ranked it by estimated value, using AI services for the validation itself. In some cases, stolen Claude Code tokens were used to run AI requests billed to the victim. On some compromised environments, the attacker also planted an SSH key for persistent access and used stolen cloud credentials to widen the scan.

Check your Next.js and React versions today

Per the Next.js advisory, apps using the App Router with React Server Components are affected when running Next.js 15.x, 16.x, or canary releases from 14.3.0-canary.77 onward. Next.js 13.x, stable 14.x, the Pages Router and the Edge Runtime are not affected. Patched releases are 15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7 and 16.0.7.

In each project, and in every environment (production, staging, preview), run:

npm ls next

Compare the result with the list above. For example, on the 15.5.x line you need at least 15.5.7:

npm install next@15.5.7

Next.js also ships a tool that checks versions and bumps them to the right release line:

npx fix-react2shell-next

The advisory states there is no workaround; upgrading is required. And remember to rebuild your Docker images: bumping package.json while an old image keeps running leaves the server exposed.

After patching: rotate keys and remove unknown SSH keys

CloudSEK stresses that stolen credentials and planted SSH keys stay usable after the flaw is patched. For any server that was internet-facing while vulnerable, work through this order:

  1. Establish how long the server ran an unpatched version, staging included.
  2. List every environment variable and config file the Node.js process can read. Treat all of it as exposed.
  3. Rotate cloud keys, GitHub tokens, AI API keys and PostgreSQL/Redis/MongoDB passwords. Revoke the old ones, not just issue new ones.
  4. Review authorized_keys for the accounts on the server and remove any SSH key you do not recognise.
  5. Audit cloud and AI-platform usage logs for unfamiliar calls, especially unexpected billing.

Longer term, limit the damage of a single compromised server: give each service its own least-privilege key, set spending caps on AI keys, and use a secrets manager instead of long-lived environment variables. Our earlier posts on API keys leaking into the browser in Next.js and keys leaked in Docker Hub images exploited within 8 seconds cover two related layers (both in Vietnamese).

Make patching someone's job

The flaw was disclosed in December 2025, yet nearly a year later thousands of unpatched servers were still being exploited. The cause is usually process: nobody owns advisory tracking, or an old image keeps running. If another team builds your software, ask which Next.js version runs in each environment and when keys were last rotated. We also covered how to follow advisories in Next.js 51 advisories in 2026. To have a running app reviewed, see Besoft's projects or get in touch.

Sources

  • BleepingComputer, Bill Toulas, "AI-powered React2Keys campaign steals secrets from 400 organizations", 1 December 2026 (based on CloudSEK research).
  • Next.js, "Security Advisory: CVE-2025-66478", 3 December 2025: https://nextjs.org/blog/CVE-2025-66478