If a server of yours ran a Next.js app vulnerable to CVE-2025-55182 (React2Shell), update it, then treat every environment variable, .env file, cloud token and SSH key on that host as read, and rotate them. CloudSEK reports that the attacker also planted an SSH key, so patching does not remove that access. My order: remove the planted key, revoke cloud and CI tokens, rotate the rest by blast radius, then read the logs.

This article is based on CloudSEK's report and BleepingComputer's coverage of it, both opened on November 30, 2026. I did not reproduce the exploit or run the commands below against a compromised host. The Ennote steps come from our documentation, checked the same day.

What CloudSEK reports

CloudSEK calls the campaign React2Keys. According to its report and BleepingComputer's summary:

  • Scale. More than 50,000 credentials from more than 19,000 victims (BleepingComputer counts hosts), with more than 400 organizations whose CI/CD, cloud and AI infrastructure were compromised. BleepingComputer gives the campaign window as November 9 to 19, 2026.
  • Entry. CVE-2025-55182, an unauthenticated remote code execution flaw in Next.js Server Actions and React Server Components (React2Shell).
  • What it took. Environment variables matching a credential pattern; .env* files, cloud credential files, SSH keys and the Kubernetes service-account token; AWS container and EKS Pod Identity credentials; Azure managed-identity tokens; GCP tokens minted from service-account keys.
  • What it did next. CloudSEK describes live database connections (a read-only superuser PostgreSQL session is described), full git archives with history, organization-wide code search with a stolen GitHub token, and use of a gateway credential to pull secrets from a third-party secrets manager (CloudSEK names Infisical; this is credential theft from the victim's host, not a reported flaw in that product). It also describes scoring stolen secrets and validating them against their providers; the key types it mentions include LLM, payment, crypto, Slack, Telegram and SMTP.
  • Persistence. An attacker's SSH public key (its blob identifies as ed25519) is appended to authorized_keys on compromised accounts. CloudSEK's detection rule gives the comment bluelocale-foothold.

What is not clear: BleepingComputer's article names no patched versions. CloudSEK's remediation advice says to patch the React Server Components packages to 19.0.1, 19.1.2, 19.2.1 or later and to upgrade Next.js to a release patched for CVE-2025-55182. It does not name that Next.js release, so I will not either. Check your framework's own advisory. CloudSEK also says the use of a 74-entry lateral-movement target list was not confirmed.

Why updating the framework does not finish the job

Remote code execution runs as your application's user. That user can read the process environment, the files in its home directory and anything its cloud identity can reach. The values were copied while the attacker had access, and CloudSEK says stolen secrets were validated against live services. An update closes the way in. It does nothing about:

  1. Copies already taken. Every secret the app could read stays exposed until it is changed at the provider.
  2. The planted key. An SSH key in authorized_keys survives a redeploy of the app if the host or the account persists.
  3. Short-lived tokens that were minted. Cloud identity tokens requested from the metadata service may stay valid after you rotate static keys. Check this per provider.

Rotation order

The order is mine. The scope of what to rotate follows CloudSEK's remediation list.

  1. Isolate, then patch. If you can, take the host out of traffic or rebuild it from a clean image after patching. A rebuilt host also drops any key written into its disk.
  2. Remove the planted key. On every host and user that ran the app, list all keys, not only the known one, because the comment can be changed:
    sudo sh -c 'for h in $(getent passwd | cut -d: -f6 | sort -u); do grep -HnF -e "bluelocale-foothold" -e "AAAAC3NzaC1lZDI1NTE5AAAAINiNfAw552VRo+E3mBu/MHaVsRDcN0BMGuVCjgIyHbb3" "$h"/.ssh/authorized_keys* 2>/dev/null; done'
    Run it as root so permission errors don't hide a match. It checks the .ssh/authorized_keys* files in every home directory listed in passwd for the comment and for a fragment of the key that CloudSEK published, and nothing else. It misses a custom AuthorizedKeysFile path from sshd_config. Then read every authorized_keys file and remove any key you cannot account for. Review cron jobs and recent SSH logins as CloudSEK advises.
  3. Revoke cloud and CI credentials next. These can create infrastructure and push code: cloud access keys and service-account keys, CI tokens, registry push credentials, Git tokens. CloudSEK lists audit targets such as new IAM users and unexpected instance deployments in CloudTrail and cloud audit logs.
  4. Rotate data and service credentials. Database passwords (PostgreSQL, Redis, MongoDB), SMTP, AI provider keys, payment, registrar and messaging tokens.
  5. Rotate your secrets manager's own credentials. CloudSEK reports a gateway credential for a third-party secrets manager being used. If a token that reads your vault sat on that host, rotate it before you trust anything stored in the vault.
  6. Review identity activity. Kubernetes service-account, EKS Pod Identity, IRSA and Azure managed-identity usage, even if no static keys were on the host. CloudSEK also recommends tight IAM scoping.
  7. Reduce the next blast radius. Run the app as a non-root user, keep per-app secrets separate, and do not share hosts across applications, as CloudSEK recommends.

Rotate at the source. Changing a value in your deployment config does not stop the old one working at the database or provider.

Doing this in Ennote

The painful part of the list above is steps 3 and 4: many values copied into hosts, CI variables and .env files. At Ennote we built the Secret Manager and CLI so teams stop passing raw environment files around: one place holds the value, and processes receive it at start.

Scope first. Ennote does not patch your application, does not find or remove SSH keys, and does not change a credential at your database or cloud provider. And it would not have stopped this attack. If an attacker runs code inside your app process, they can read what that process has in memory and in its environment, whatever tool put it there. What the setup below changes: there are no .env files on disk to copy, the old value is one version in one place, and rotation is usually a single edit plus a restart.

1. Sign in and choose a workspace. (CLI quickstart)

ennote auth login
ennote config set organization-id my-org-id
ennote config set workspace-id my-workspace-id

2. Store the new values as a Keys Values secret. Generate the new password or key at the provider first, then store it. Piping from standard input keeps it out of shell history, which the docs recommend (ennote secret create):

printf 'DATABASE_URL=%s\nSTRIPE_KEY=%s\n' "$NEW_DATABASE_URL" "$NEW_STRIPE_KEY" \
  | ennote secret create "web-app-prod" --type KEYS_VALUES --labels "react2keys-rotation"

3. Start the app with the values injected, not written. The documentation says each key of the secret becomes an environment variable of the command you run, that no .env file is written, and that the values stay in that process tree (ennote secret get):

ennote secret get "web-app-prod" -- node server.js

This removes the .env* files from the list of things an attacker can read from disk. Code inside node still sees the values, as noted above.

Authentication on a headless host. If a personal access token sat on the compromised host, revoke it first: it reads your vault. On a headless host or in CI, the CLI authenticates with a personal access token, and you should set an expiration. Tokens last between 1 hour and 30 days and you can have up to 10 active (Personal access tokens). For CI, the documented rotation order is: create the new token, update the ENNOTE_TOKEN repository secret, then revoke the old token (GitHub Actions guide).

4. Rotate again later. Every change to a secret creates a new version with a timestamp and the user who made it, and you can revert (Secret Versions).

5. Get a record. On the Team plan, audit logs record secret creation, access, sharing, modification and deletion in shared workspaces, with the user and IP address, and notifications can go to Slack or Telegram (Audit Logs, Audit Notifications). That helps you see who read a secret after the rotation. It is not a view into your host.

If your app runs on Kubernetes. Our Ennote Kubernetes agent writes secrets from Ennote into native Kubernetes Secrets (Agents Overview, Deployment). The limit: a native Secret is readable by the pods and service accounts that can read it, and CloudSEK lists the Kubernetes service-account token among the files taken. After the incident, rotate through the same path and restrict which service accounts can read Secrets.

How to check that it worked.

  • At the provider, confirm the old credential is revoked: try it and expect a failure.
  • On the host, re-run the grep above and read every authorized_keys file again; the grep proves only that the two published indicators are gone, not that every unknown key is.
  • In Ennote, open the secret's version history and confirm the new version has your user and a timestamp.
  • Run ennote secret get "web-app-prod" -- env on a test host and confirm the new variables appear. This prints the values to your terminal, so use it only on a throwaway shell.

You can create a free workspace on the Developer plan to try these steps.

Make the next one smaller

  • Keep secrets out of files on the web host. CloudSEK lists .env* files as a target. Fewer files means less to copy.
  • Give each app its own narrowly scoped identity. The attacker's cloud and database reach was whatever the app's credentials allowed.
  • Know where each secret lives. The incident routine is in rotating environment variables after a platform breach.
  • Move static .env copies out of CI. See secrets in Docker images for what happens when they ship in an image.

Sources


Start free on the Developer plan: Ennote is a corporate secret manager for passwords, API keys and environment variables, with versions and audit logs.