CODERED VTA

Unpatched Next js Servers Bleed 50000 Credentials in Ongoing React2Keys Campaign

High
Cybersecurity concept with a lock
Photo by Adi Goldstein on Unsplash

A credential harvesting operation tracked as React2Keys is still working its way through internet-facing Next.js deployments almost a year after the React2Shell flaw was made public. The campaign exploits CVE-2025-55182, an unauthenticated remote code execution vulnerability in React Server Components and frameworks built on them, including Next.js. Recovered exfiltration logs attributed to the operator put the haul at more than 50,000 credentials covering AI providers, AWS, Azure and Google Cloud identities, database logins, SSH keys, payment tokens and cryptocurrency services, taken from infrastructure associated with over 400 organisations. A wider sweep of the campaign identified more than 19,000 affected hosts and victims spread across multiple regions. Any organisation running an internet-reachable Next.js or React Server Components application that has not taken the fixes published after the December 2025 disclosure is in scope, and the window is measured in minutes rather than days: the operator's discovery pipeline picks up a newly deployed host within minutes of its first TLS certificate being issued, and the exploitation is unauthenticated and automated. The campaign reporting does not enumerate the fixed release numbers, which are carried in the React and Next.js maintainers' own advisories.

The operation is built around an automated discovery pipeline rather than targeted selection. Six public Certificate Transparency logs are polled every three minutes, so newly issued TLS certificates reveal freshly deployed domains and push them into a scanning queue within minutes of going live. Each candidate is then fingerprinted to establish whether it is a Next.js application and whether it is likely to be vulnerable. Exploitation itself is a single unauthenticated HTTP POST request to a route reachable through Next.js Server Actions, carrying a crafted React Flight payload that triggers prototype pollution and leads to arbitrary JavaScript execution inside the server's Node.js process. From there the attacker reads environment variables, configuration files and other on-disk locations for secrets, then validates and ranks what it finds by likely monetary value, separating live keys from expired, disabled, rate-limited or credit-exhausted ones by testing some of them against the real services. Where a payload is blocked at the Cloudflare edge, a dedicated module attempts to locate the underlying origin server and hit it directly. The operator was also observed writing its own SSH public key into the authorized_keys files of compromised accounts, which preserves access to the host after the vulnerable application itself has been fixed.

CVE-2025-55182 is confirmed exploited in the wild: it was added to the CISA Known Exploited Vulnerabilities catalog on 5 December 2025, has known use in ransomware campaigns, and FIRST's EPSS model puts the probability of exploitation in the next 30 days at 99.7 percent. That places React2Keys firmly in the category of live, present danger rather than theoretical risk. The more awkward consequence for affected organisations is that remediation of the vulnerability does not undo the breach: cloud keys, database credentials, payment tokens and AI provider API keys lifted from a server remain valid wherever they are reused, and the planted SSH key survives the patch. Stolen AI keys in particular produce a loss that only becomes visible on the next invoice, because the attacker's workload runs on the victim's billing account. Compromised cloud credentials were also turned back on their owners to fund further operations, with AWS Lambda workers and virtual machines spun up on victim accounts to widen the scanning footprint, meaning a breached organisation can quietly become part of the infrastructure hunting the next set of targets. The persistence of 19,000 exposed hosts almost a year after a patch exists is the clearest signal here, and the discovery pipeline guarantees that newly stood-up, unpatched deployments are found within minutes of their first certificate being issued.

Attack Surface

Web Application, Cloud Service, Infrastructure, Server OS

Tactics

Reconnaissance, Resource Development, Initial Access, Execution, Credential Access, Discovery, Persistence, Exfiltration, Impact

Techniques

  • T1596.003 – Search Open Technical Databases: Digital Certificates
  • T1595.002 – Active Scanning: Vulnerability Scanning
  • T1190 – Exploit Public-Facing Application
  • T1552.001 – Unsecured Credentials: Credentials In Files
  • T1098.004 – Account Manipulation: SSH Authorized Keys
  • T1078.004 – Valid Accounts: Cloud Accounts
  • T1496 – Resource Hijacking

SuperPRO's Threat Countermeasures Procedures

  1. Inventory every internet-facing Next.js and React Server Components deployment, record the running framework version with a command such as npm ls next react-server-dom-webpack, and compare it against the patched release named in the React and Next.js maintainers' security advisories for CVE-2025-55182 published after the December 2025 disclosure; the campaign reporting itself does not list the fixed build numbers, so the maintainers' advisory is the authority for the version the ticket must reach.
  2. Treat any exposed host as compromised and rotate every secret that sat on it: AWS, Azure and Google Cloud access keys, database logins, SSH private keys, payment tokens, cryptocurrency credentials and AI provider API keys for OpenAI, Anthropic and Google. Patching the framework does not invalidate credentials already exfiltrated.
  3. Audit ~/.ssh/authorized_keys for every account on affected servers, including service and deploy accounts, and remove any public key you cannot attribute to a named administrator – the operator planted its own SSH public key to retain access after the application was fixed.
  4. Block direct access to the origin servers behind Cloudflare-fronted Next.js applications by restricting the origin firewall to Cloudflare IP ranges and rotating any origin IP that has previously been exposed in DNS records – the campaign runs a dedicated module that locates the underlying origin and sends the exploit request straight to it when the payload is blocked at the Cloudflare edge.
  5. Set hard spend caps and billing alerts on OpenAI, Anthropic and Google AI accounts, and on cloud billing, so unauthorised model usage on a stolen key is flagged before it reaches the invoice.
  6. Restrict cloud IAM roles attached to web application hosts to least privilege and alert on CreateFunction, Invoke and RunInstances activity in regions your organisation does not normally use – victim AWS Lambda workers and virtual machines were used to fund and run further scanning.
  7. Monitor Certificate Transparency entries for your own domains and treat each newly issued TLS certificate for a Next.js or React Server Components host as the start of an exposure window, since the operator polls six public CT logs every three minutes and queues freshly deployed domains for fingerprinting and exploitation within minutes of the certificate appearing.

Source

Code Red Cyber / VTA – coderedcyber.ai