Next.js hackers steal AI and cloud keys from exposed servers

Published

Deploy a Next.js app with a fresh TLS certificate and, according to CloudSEK, it can be in an attacker's scan queue within minutes. The firm's threat intelligence team has detailed a fully automated operation it calls React2Keys, which exploits the React2Shell remote code execution flaw (CVE-2025-55182) to steal every secret it can find on the server: cloud keys, AI provider keys, database passwords, payment and registrar credentials, and cryptocurrency exchange keys.

CloudSEK says the attacker has compromised CI/CD, cloud and AI infrastructure associated with more than 400 organizations, and puts the haul at more than 50,000 credentials from over 19,000 victims across dozens of countries. It does not see a sector or regional focus. The researchers mapped the operation from recovered attacker material that included a 1.9-million-line exfiltration log and a toolkit of more than 900,000 files, as set out in the original report.

From a new certificate to a stolen key

The actor polls six public Certificate Transparency logs every three minutes, fingerprints the new domains for Next.js, and fires a single unauthenticated POST request at any route that reaches a Server Action. CloudSEK reports that the crafted request makes the server run attacker JavaScript inside the live Node.js process, with output smuggled back in the digest field of an error message. The exploit re-sends its payload at every redirect so apps behind login redirects are not wrongly marked as patched.

Once inside, the payload works out where it is running (a Kubernetes pod, AWS Lambda, ECS Fargate or a plain container), matches every environment variable against credential patterns, and reads .env files, cloud credential files, SSH keys and Kubernetes service-account tokens. Follow-on payloads pull temporary AWS credentials from container metadata, steal Azure managed-identity tokens, open live connections to the victim's PostgreSQL, Redis and MongoDB databases, and archive git repositories with their history. In one case a secrets-manager gateway credential was used to empty the whole vault.

Why the AI keys get special attention

Stolen AI keys are tested against roughly ten LLM providers, and CloudSEK says the actor steals victims' Claude Code login tokens and runs inference billed to the victim's subscription. Where a stolen AWS account is gated from Anthropic models on Amazon Bedrock, a script submits the use-case form with the stolen credentials. Every secret is scored by estimated monetary value and then validated in priority order, and stolen cloud tokens are reinvested to run more scanning, including a worker deployed on AWS Lambda inside a stolen-credential account.

The same tooling has an Odoo mode aimed at CVE-2026-25137 and a WordPress chain targeting CVE-2026-63030 and CVE-2026-60137, though CloudSEK found only 4 of 2,939 scanned WordPress hosts vulnerable. IntelFusions previously covered critical Next.js flaws that let attackers run code on servers.

Patch React, then rotate everything on the host

Upgrade React Server Components packages to 19.0.1, 19.1.2, 19.2.1 or later and move Next.js to a release patched for CVE-2025-55182. CloudSEK stresses that patching is not enough, because stolen credentials keep working after the hole is closed. Assume every environment variable and secret file on an exposed host is compromised and rotate it. Check every authorized_keys file: the actor appends its own SSH key, labelled bluelocale-foothold, so access survives patching, and CloudSEK publishes the full key and a Sigma rule in its report. Review CloudTrail and AI platform usage for new IAM users, Bedrock model-access changes and unexpected deployments. CloudSEK has also launched an exposure validation tool for checking a domain or work email.

React2Keys is a reminder that an app server is rarely just an app server. It is where an organization's keys to everything else live, and a single unpatched route hands them over.

This briefing is provided by IntelFusions for informational and defensive purposes only. It is based on sources assessed to be reliable at the time of writing, and analytic judgments carry the confidence levels indicated. Indicators of compromise are defanged; re-arm them only in controlled environments. IntelFusions is not affiliated with the organizations named and makes no warranty as to completeness or accuracy.

Detection coverage

Earlier in Cyber Incidents

All Cyber Incidents briefings

Latest briefings

Read the full analysis on IntelFusions