Red Team

React2Keys: AI-assisted React2Shell campaign stole 50,000 secrets

React2Keys used React2Shell to take 50,000+ cloud, AI and payment secrets from unpatched Next.js apps and planted SSH keys. What UK teams must rotate.

Target motif with the headline React2Keys harvests 50,000 secrets automatically

An automated, AI-assisted operation dubbed React2Keys abused a year-old React flaw to harvest over 50,000 secrets in ten days. The attacker then planted SSH keys and used victims’ own cloud and AI accounts to fund further activity, so patching after the fact is not enough.

What happened

On 30 November 2026, CloudSEK’s threat research team published details of a credential-harvesting campaign it has named React2Keys. Between 9 and 19 November, the operator exploited React2Shell (CVE-2025-55182) on internet-facing applications built with React Server Components, mostly Next.js. React2Shell is a CVSS 10.0 unauthenticated remote code execution bug that the React team disclosed in December 2025.

CloudSEK says it got access to the attacker’s own infrastructure. What it recovered included scan databases, result folders for each victim, over 900,000 toolkit files and an exfiltration log of 1.9 million lines. From that material, the company counts over 50,000 stolen credentials from more than 19,000 hosts. Those hosts are linked to CI/CD, cloud and AI infrastructure at more than 400 organisations. They include roughly 20,600 application secrets, 7,800 cloud credentials, nearly 3,000 AI platform keys and around 2,100 payment credentials.

The victims are not one sector or one region. The IT Nerd, reporting CloudSEK’s figures, lists Brazil (22.9%) and India (18.4%) as the largest shares, followed by Germany, Russia and France. The UK is not named in the published breakdown. CloudSEK has not attributed the activity to any known group.

The technical picture

What stands out is how little of the operation needs a human.

Discovery. The operator polls six public Certificate Transparency logs every three minutes. A site that has just been issued a TLS certificate can therefore be in the queue within minutes of going live. Only about 3% of domains pass its Next.js fingerprinting. Another module hunts for origin servers hidden behind Cloudflare to sidestep edge blocking.

Initial access. A single unauthenticated request to a route that reaches a Server Action is enough to run attacker JavaScript inside the Node.js process. Results return through the framework’s own error handling, and the request is replayed at each redirect so apps behind login middleware are not misjudged as patched.

Harvesting. The payload works out whether it is running in a Kubernetes pod, Lambda, ECS Fargate, a PM2 host or a plain container. It then pulls every environment variable that looks sensitive, plus .env files, SSH keys, cloud credential files and the Kubernetes service-account token.

Pivoting. The operator exchanged Kubernetes tokens through EKS Pod Identity for temporary AWS credentials even where no static key existed, and lifted Azure managed-identity and Google Cloud tokens too. It connected to victims’ databases, cloned git repositories with history and searched whole GitHub organisations for more secrets. In one case, a gateway credential sitting in the application’s environment unlocked every secret in a third-party secrets manager (Infisical).

Triage. Each secret is given an estimated monetary value and then checked against its provider in priority order. AI keys were tested against around ten model providers, and stolen Claude Code login tokens were refreshed and used for inference billed to the victim. Where an AWS account was gated from Anthropic models on Amazon Bedrock, a script submitted the access form using the stolen credentials.

Persistence and reinvestment. The attacker added its own public key to authorized_keys on compromised accounts. Stolen cloud access then paid for more capacity: one scanning worker was deployed as an AWS Lambda function in an account opened with stolen credentials, and a cloud provider token in the attacker’s own provisioning scripts also turned up in a victim’s leaked environment. Of nine live Telegram bot tokens CloudSEK found in the attacker’s tooling, eight belonged to victims.

Flow diagram of the React2Keys campaign: discover via Certificate Transparency logs, exploit React2Shell, harvest secrets, pivot into cloud and databases, triage by value, persist with SSH keys.

Why it matters for UK organisations

The UK’s absence from the country table is no comfort. Targeting is driven by Certificate Transparency logs and framework fingerprints, not geography. Any British organisation running an unpatched Next.js app, from marketing microsites to customer portals, was in scope.

The bigger concern is where those apps sit. Next.js deployments tend to live in the same cloud accounts and pipelines as everything else, with environment variables holding keys to payments, email, AI services and production databases. A breach of one front end can quickly become a reportable personal data breach under UK GDPR if a database or CRM key is in the haul. It can also become a supply chain incident if the stolen GitHub token reaches code that ships to customers.

Stolen AI access is now a commodity too: an unexpected AI provider invoice may be the last symptom, not the first.

Expert view

In my experience, the gap between “we patched” and “we are clean” is where most of the real damage happens, and React2Keys is a textbook case. CloudSEK puts it bluntly: “patching alone is insufficient”. Upgrading the React packages closes the door, but it does nothing about keys that have already left the building or an SSH key already sitting in authorized_keys.

When we test cloud-native applications, the finding that turns a medium into a critical is nearly always the same. The workload can see far more than it needs to: long-lived keys in environment variables, an over-scoped IAM role, a vault token with read access to everything. This campaign automates that across thousands of hosts.

The speed is worth dwelling on. With certificates becoming targets in minutes, the quiet window after deployment has gone. The use of AI here is less about clever exploitation and more about tireless sorting and validation of loot. That dull work used to limit what a small crew could cash in.

What to do now

  1. Find every React Server Components app you own. Include shadow and forgotten deployments. Bring the React server packages up to a fixed version (19.0.1, 19.1.2 or 19.2.1 onwards) and Next.js to its patched release (Cyber Essentials: security update management).
  2. If an app was exposed and unpatched at any point since December 2025, treat it as compromised. Rotate every secret the host could read: cloud keys, AI provider keys, database passwords, payment, email, registrar and messaging tokens, and any secrets-manager credential.
  3. Hunt for persistence. Review authorized_keys files, cron jobs and SSH logins on affected hosts, and check for the indicator of compromise CloudSEK has published, using its Sigma rule.
  4. Do not assume no static keys means no exposure. Review EKS Pod Identity, IRSA, Kubernetes service-account and Azure managed-identity activity, and tighten IAM roles to least privilege (Cyber Essentials: user access control).
  5. Check the logs and the bills. Look in CloudTrail and other cloud audit logs for new IAM users, unexpected Lambda functions or instances, Bedrock model-access changes and unusual AI platform usage.
  6. Reduce blast radius. Run applications as non-root, keep secrets per application, avoid shared hosts, and make sure a single app credential cannot read your whole secrets vault (Cyber Essentials: secure configuration).

Bottom line

React2Keys shows how quickly a known, patched web bug becomes an industrialised secret-theft pipeline once automation and AI take over the tedious parts. If you run Next.js and cannot prove it was patched in time, assume the keys have gone. Rotate them, look for planted SSH keys, and treat the cloud account, not the web server, as the scene of the incident.

Sources