[{"data":1,"prerenderedAt":35},["ShallowReactive",2],{"post-data-react2keys-nextjs-rce-credential-theft-rotate-secrets":3},{"post":4,"relatedPosts":19},{"id":5,"title":6,"content":7,"hashtags":8,"coverImage":14,"createdAt":15,"updatedAt":16,"seoTitle":17,"seoDescription":18},"cn3JoS3dZSafxLuVlhxF","CloudSEK: React2Keys Took 50,000+ Credentials From Next.js Servers, What to Rotate and in What Order","\u003Cdiv class=\"container\">\n\u003Cp>If a server of yours ran a Next.js app vulnerable to CVE-2025-55182 (React2Shell), update it, then treat every environment variable, \u003Ccode>.env\u003C\u002Fcode> 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.\u003C\u002Fp>\n\u003Cp>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.\u003C\u002Fp>\n\u003Ch2>What CloudSEK reports\u003C\u002Fh2>\n\u003Cp>CloudSEK calls the campaign React2Keys. According to its report and BleepingComputer's summary:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Scale.\u003C\u002Fstrong> More than 50,000 credentials from more than 19,000 victims (BleepingComputer counts hosts), with more than 400 organizations whose CI\u002FCD, cloud and AI infrastructure were compromised. BleepingComputer gives the campaign window as November 9 to 19, 2026.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Entry.\u003C\u002Fstrong> CVE-2025-55182, an unauthenticated remote code execution flaw in Next.js Server Actions and React Server Components (React2Shell).\u003C\u002Fli>\n\u003Cli>\u003Cstrong>What it took.\u003C\u002Fstrong> Environment variables matching a credential pattern; \u003Ccode>.env*\u003C\u002Fcode> 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.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>What it did next.\u003C\u002Fstrong> 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.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Persistence.\u003C\u002Fstrong> An attacker's SSH public key (its blob identifies as ed25519) is appended to \u003Ccode>authorized_keys\u003C\u002Fcode> on compromised accounts. CloudSEK's detection rule gives the comment \u003Ccode>bluelocale-foothold\u003C\u002Fcode>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>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.\u003C\u002Fp>\n\u003Ch2>Why updating the framework does not finish the job\u003C\u002Fh2>\n\u003Cp>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:\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Copies already taken.\u003C\u002Fstrong> Every secret the app could read stays exposed until it is changed at the provider.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The planted key.\u003C\u002Fstrong> An SSH key in \u003Ccode>authorized_keys\u003C\u002Fcode> survives a redeploy of the app if the host or the account persists.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Short-lived tokens that were minted.\u003C\u002Fstrong> Cloud identity tokens requested from the metadata service may stay valid after you rotate static keys. Check this per provider.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch2>Rotation order\u003C\u002Fh2>\n\u003Cp>The order is mine. The scope of what to rotate follows CloudSEK's remediation list.\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Isolate, then patch.\u003C\u002Fstrong> 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.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Remove the planted key.\u003C\u002Fstrong> On every host and user that ran the app, list all keys, not only the known one, because the comment can be changed:\n\u003Cpre>\u003Ccode>sudo sh -c 'for h in $(getent passwd | cut -d: -f6 | sort -u); do grep -HnF -e \"bluelocale-foothold\" -e \"AAAAC3NzaC1lZDI1NTE5AAAAINiNfAw552VRo+E3mBu\u002FMHaVsRDcN0BMGuVCjgIyHbb3\" \"$h\"\u002F.ssh\u002Fauthorized_keys* 2&gt;\u002Fdev\u002Fnull; done'\u003C\u002Fcode>\u003C\u002Fpre>\nRun it as root so permission errors don't hide a match. It checks the \u003Ccode>.ssh\u002Fauthorized_keys*\u003C\u002Fcode> files in every home directory listed in \u003Ccode>passwd\u003C\u002Fcode> for the comment and for a fragment of the key that CloudSEK published, and nothing else. It misses a custom \u003Ccode>AuthorizedKeysFile\u003C\u002Fcode> path from \u003Ccode>sshd_config\u003C\u002Fcode>. Then read every \u003Ccode>authorized_keys\u003C\u002Fcode> file and remove any key you cannot account for. Review cron jobs and recent SSH logins as CloudSEK advises.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Revoke cloud and CI credentials next.\u003C\u002Fstrong> 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.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Rotate data and service credentials.\u003C\u002Fstrong> Database passwords (PostgreSQL, Redis, MongoDB), SMTP, AI provider keys, payment, registrar and messaging tokens.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Rotate your secrets manager's own credentials.\u003C\u002Fstrong> 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.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Review identity activity.\u003C\u002Fstrong> 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.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Reduce the next blast radius.\u003C\u002Fstrong> Run the app as a non-root user, keep per-app secrets separate, and do not share hosts across applications, as CloudSEK recommends.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>Rotate at the source. Changing a value in your deployment config does not stop the old one working at the database or provider.\u003C\u002Fp>\n\u003Ch2>Doing this in Ennote\u003C\u002Fh2>\n\u003Cp>The painful part of the list above is steps 3 and 4: many values copied into hosts, CI variables and \u003Ccode>.env\u003C\u002Fcode> 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.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Scope first.\u003C\u002Fstrong> 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 \u003Ccode>.env\u003C\u002Fcode> files on disk to copy, the old value is one version in one place, and rotation is usually a single edit plus a restart.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>1. Sign in and choose a workspace.\u003C\u002Fstrong> (\u003Ca href=\"https:\u002F\u002Fdocs.ennote.io\u002Fcli\u002Fquickstart\">CLI quickstart\u003C\u002Fa>)\u003C\u002Fp>\n\u003Cpre>\u003Ccode>ennote auth login\nennote config set organization-id my-org-id\nennote config set workspace-id my-workspace-id\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Cstrong>2. Store the new values as a Keys Values secret.\u003C\u002Fstrong> 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 (\u003Ca href=\"https:\u002F\u002Fdocs.ennote.io\u002Fcli\u002Fcommands\u002Fsecret\u002Fcreate\">\u003Ccode>ennote secret create\u003C\u002Fcode>\u003C\u002Fa>):\u003C\u002Fp>\n\u003Cpre>\u003Ccode>printf 'DATABASE_URL=%s\\nSTRIPE_KEY=%s\\n' \"$NEW_DATABASE_URL\" \"$NEW_STRIPE_KEY\" \\\n  | ennote secret create \"web-app-prod\" --type KEYS_VALUES --labels \"react2keys-rotation\"\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Cstrong>3. Start the app with the values injected, not written.\u003C\u002Fstrong> The documentation says each key of the secret becomes an environment variable of the command you run, that no \u003Ccode>.env\u003C\u002Fcode> file is written, and that the values stay in that process tree (\u003Ca href=\"https:\u002F\u002Fdocs.ennote.io\u002Fcli\u002Fcommands\u002Fsecret\u002Fget\">\u003Ccode>ennote secret get\u003C\u002Fcode>\u003C\u002Fa>):\u003C\u002Fp>\n\u003Cpre>\u003Ccode>ennote secret get \"web-app-prod\" -- node server.js\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>This removes the \u003Ccode>.env*\u003C\u002Fcode> files from the list of things an attacker can read from disk. Code inside \u003Ccode>node\u003C\u002Fcode> still sees the values, as noted above.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Authentication on a headless host.\u003C\u002Fstrong> 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 (\u003Ca href=\"https:\u002F\u002Fdocs.ennote.io\u002Fdocs\u002Fauth\u002Fuser-tokens\">Personal access tokens\u003C\u002Fa>). For CI, the documented rotation order is: create the new token, update the \u003Ccode>ENNOTE_TOKEN\u003C\u002Fcode> repository secret, then revoke the old token (\u003Ca href=\"https:\u002F\u002Fdocs.ennote.io\u002Fcli\u002Fguides\u002Fgithub-actions\">GitHub Actions guide\u003C\u002Fa>).\u003C\u002Fp>\n\u003Cp>\u003Cstrong>4. Rotate again later.\u003C\u002Fstrong> Every change to a secret creates a new version with a timestamp and the user who made it, and you can revert (\u003Ca href=\"https:\u002F\u002Fdocs.ennote.io\u002Fdocs\u002Fsecrets\u002Fversions\">Secret Versions\u003C\u002Fa>).\u003C\u002Fp>\n\u003Cp>\u003Cstrong>5. Get a record.\u003C\u002Fstrong> 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 (\u003Ca href=\"https:\u002F\u002Fdocs.ennote.io\u002Fdocs\u002Forganization\u002Faudit\u002Flogs\">Audit Logs\u003C\u002Fa>, \u003Ca href=\"https:\u002F\u002Fdocs.ennote.io\u002Fdocs\u002Forganization\u002Faudit\u002Fnotifications\">Audit Notifications\u003C\u002Fa>). That helps you see who read a secret after the rotation. It is not a view into your host.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>If your app runs on Kubernetes.\u003C\u002Fstrong> Our Ennote Kubernetes agent writes secrets from Ennote into native Kubernetes Secrets (\u003Ca href=\"https:\u002F\u002Fdocs.ennote.io\u002Fdocs\u002Fagents\u002Foverview\">Agents Overview\u003C\u002Fa>, \u003Ca href=\"https:\u002F\u002Fdocs.ennote.io\u002Fdocs\u002Fagents\u002Fdeployment\">Deployment\u003C\u002Fa>). 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.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>How to check that it worked.\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>At the provider, confirm the old credential is revoked: try it and expect a failure.\u003C\u002Fli>\n\u003Cli>On the host, re-run the \u003Ccode>grep\u003C\u002Fcode> above and read every \u003Ccode>authorized_keys\u003C\u002Fcode> file again; the grep proves only that the two published indicators are gone, not that every unknown key is.\u003C\u002Fli>\n\u003Cli>In Ennote, open the secret's version history and confirm the new version has your user and a timestamp.\u003C\u002Fli>\n\u003Cli>Run \u003Ccode>ennote secret get \"web-app-prod\" -- env\u003C\u002Fcode> 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.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>You can \u003Ca href=\"https:\u002F\u002Fapp.ennote.io\u002F?utm_source=blog&amp;utm_medium=article&amp;utm_campaign=react2keys-nextjs-rce-credential-theft-rotate-secrets&amp;utm_content=inline\">create a free workspace\u003C\u002Fa> on the Developer plan to try these steps.\u003C\u002Fp>\n\u003Ch2>Make the next one smaller\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Keep secrets out of files on the web host.\u003C\u002Fstrong> CloudSEK lists \u003Ccode>.env*\u003C\u002Fcode> files as a target. Fewer files means less to copy.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Give each app its own narrowly scoped identity.\u003C\u002Fstrong> The attacker's cloud and database reach was whatever the app's credentials allowed.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Know where each secret lives.\u003C\u002Fstrong> The incident routine is in \u003Ca href=\"https:\u002F\u002Fennote.io\u002Fblog\u002Frotate-environment-variables-after-platform-breach\u002F\">rotating environment variables after a platform breach\u003C\u002Fa>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Move static \u003Ccode>.env\u003C\u002Fcode> copies out of CI.\u003C\u002Fstrong> See \u003Ca href=\"https:\u002F\u002Fennote.io\u002Fblog\u002Fsecrets-in-docker-images-stolen-in-seconds\u002F\">secrets in Docker images\u003C\u002Fa> for what happens when they ship in an image.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Sources\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fwww.cloudsek.com\u002Fblog\u002Freact2keys-react2shell-ai-powered-credential-theft\">React2Keys: React2Shell AI-powered credential theft\u003C\u002Fa>, CloudSEK, November 30, 2026\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fwww.bleepingcomputer.com\u002Fnews\u002Fsecurity\u002Fai-powered-react2keys-campaign-steals-secrets-from-400-organizations\u002F\">AI-powered React2Keys campaign steals secrets from 400 organizations\u003C\u002Fa>, BleepingComputer, November 30, 2026\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Chr>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fapp.ennote.io\u002F?utm_source=blog&amp;utm_medium=article&amp;utm_campaign=react2keys-nextjs-rce-credential-theft-rotate-secrets&amp;utm_content=footer\">Start free on the Developer plan\u003C\u002Fa>: Ennote is a corporate secret manager for passwords, API keys and environment variables, with versions and audit logs.\u003C\u002Fp>\n\u003C\u002Fdiv>",[9,10,11,12,13],"nextjs","react2shell","secretmanagement","devsecops","cybersecurity","https:\u002F\u002Ffirebasestorage.googleapis.com\u002Fv0\u002Fb\u002Fblog-01-c712e.firebasestorage.app\u002Fo\u002Fblog-covers%2F1796049963817_react2keys-nextjs-rce-credential-theft-rotate-secrets.jpeg?alt=media&token=94cc5356-2778-4ae0-8683-7fcebf7ba92f",1796049965713,1796050029344,"React2Shell Credentials Stolen: What to Rotate","CloudSEK: React2Keys used CVE-2025-55182 to steal env vars and keys and plant an SSH key. What to rotate and audit, and how to do it with Ennote",[20,25,30],{"title":21,"slug":22,"coverImage":23,"createdAt":24},"HashiCorp Vault vs. Infisical vs. Ennote: The Future of Kubernetes Secret Management","hashicorp-vault-vs-infisical-vs-ennote-the-future-of-kubernetes-secret-management","https:\u002F\u002Ffirebasestorage.googleapis.com\u002Fv0\u002Fb\u002Fblog-01-c712e.firebasestorage.app\u002Fo\u002Fblog-covers%2F1777266422787_wmremove-transformed%20(3).png?alt=media&token=fe8c588f-9c3e-4dbe-801b-b3fe5f314dd0",1777266425973,{"title":26,"slug":27,"coverImage":28,"createdAt":29},"5 Risky Ways Your Team Shares Secrets (And How to Stop Them)","5-risky-ways-your-team-shares-secrets-and-how-to-stop-them","https:\u002F\u002Ffirebasestorage.googleapis.com\u002Fv0\u002Fb\u002Fblog-01-c712e.firebasestorage.app\u002Fo\u002Fblog-covers%2F1777090988952_leaking-secrets.png?alt=media&token=8a6ada1e-2345-4254-8f36-250bbab97117",1777090991652,{"title":31,"slug":32,"coverImage":33,"createdAt":34},"Product Update:  Post-Quantum Cryptography meets \u003C1s Kubernetes Syncs","product-update-post-quantum-cryptography-meets-1s-kubernetes-syncs","https:\u002F\u002Ffirebasestorage.googleapis.com\u002Fv0\u002Fb\u002Fblog-01-c712e.firebasestorage.app\u002Fo\u002Fblog-covers%2F1779861206663_Gemini_Generated_Image_ghqtxxghqtxxghqt.png?alt=media&token=76222004-7015-4960-a8e1-29083eeb4ff9",1779860130922,1796321269745]