React2STEAL: Unpatched Next.js Servers Are Leaking Secrets to Public GitHub Repos

On November 18, 2026, OpenSourceMalware published research on a campaign it calls React2STEAL. GitHub Actions workflows in what look like hijacked GitHub accounts scan the internet for Next.js servers. They exploit two bugs that were fixed long ago and commit whatever they steal, including environment variables, .env files, cloud credentials and AI provider keys, to public repositories.
The bugs are not new. What's new is the scale and the fact that stolen secrets are published in the open. If you self-host a Next.js app and haven't touched its dependencies in a while, check it today. If the check turns up anything, assume every secret that server could read has already leaked.
What Happened
According to the research, the operator commits a list of hosts to a repository and starts a workflow, .github/workflows/scan.yml, by hand on GitHub-hosted runners. A prefilter picks likely Next.js hosts. Scanners then try three things:
- React2Shell, CVE-2025-55182: unauthenticated remote code execution in React Server Components, disclosed on December 3, 2025. The research says seven variants are tried.
- The Next.js middleware bypass, CVE-2025-29927: a crafted
x-middleware-subrequestheader skips middleware, including auth checks done there. It was fixed in March 2025. - An SSRF through
/_next/imagethat points the image optimizer at the cloud metadata address (169.254.169.254) to read AWS role credentials.
When code execution works, a payload (bin/fast_recon.js) collects environment variables, cloud and Kubernetes credentials and network details. Newer variants also take .env and config files. The research says it tests the stolen AI provider keys (OpenAI, Anthropic, Gemini and others) from the victim's own server, so that traffic comes from your IP, not the attacker's. The workflow then commits the results to the same public repository.
The numbers below come from the research and are described as minimums: 45 repositories across 44 GitHub accounts, at least 1,281 victim hostnames across about 1,100 domains, and new results committed about every 11 minutes as of November 17. A GitGuardian write-up on November 20 repeats these findings. The research says the same accounts appear in the wfx-loot campaign from earlier this month.
Not confirmed as of November 28: whether GitHub has taken the repositories down, and who runs the campaign. Neither source says. Deleting a repository also doesn't remove copies that were already cloned or forked.
Who Is Affected
You're in scope if you run Next.js yourself (a VM, Docker, Kubernetes or a platform that runs next start) and any of these is true:
- React Server Components packages on a vulnerable version.
react-server-dom-webpack,-turbopackor-parcelat 19.0.0, 19.1.0, 19.1.1 or 19.2.0. Fixed in 19.0.1, 19.1.2 and 19.2.1. Next.js bundles these packages, so the version ofnextis what counts. The React advisory lists minimum fixed Next.js releases per line, for example 15.5.10, 16.0.11 and 16.1.5, and 14.2.35 for apps on 13.3 to 14.x. Later December 2025 fixes moved those minimums up, so take the newest patch on your line rather than the minimum. nextolder than 12.3.5, 13.5.9, 14.2.25 or 15.2.3, and auth or access control in middleware. That's the CVE-2025-29927 range from the GitHub advisory.- The image optimizer can reach the metadata endpoint. For example, an EC2 or ECS host that still allows IMDSv1, with
images.remotePatternsbroad enough to allow it. The research doesn't say which Next.js configurations let this request through, so treat broad remote patterns on AWS as a risk.
Apps that only export static files aren't exposed to the first two bugs, since there is no server to attack. For managed hosting, check your provider's own statement on each CVE instead of assuming.
What to Do Today
- Find every running Next.js. Check each production image and host, not just the repo. Run
npm ls next react-server-dom-webpack react-server-dom-turbopack(or thepnpm whyequivalent) in each app. Look for apps that were deployed once and never rebuilt: internal admin tools, marketing sites, staging. - Upgrade to the newest patch on your line, rebuild the image without cached layers, and redeploy. If you're on a line that no longer gets fixes, move to a supported line instead of waiting.
- Until every app is patched, reject the header at the edge. Strip or block
x-middleware-subrequeston incoming requests at your proxy, load balancer or WAF. Both sources recommend this. It only covers CVE-2025-29927, not React2Shell. - Close the metadata route. On AWS, require IMDSv2 on every instance and launch template. Narrow
images.remotePatternsto the hosts you actually serve images from. - Search your logs. The research gives two request patterns:
x-middleware-subrequestrepeated five times in one header, and/_next/image?url=requests pointing at169.254.169.254. Also look for multipart POSTs with aNext-Actionheader on routes that don't normally get them. - If anything was vulnerable while internet-facing, rotate. Treat every secret the server process could read as exposed: database URLs, Stripe keys, cloud credentials, OAuth secrets, webhook signing keys, and AI provider keys. Rotate first, then check usage dashboards (especially AI provider spend) for activity you don't recognise.
How to Verify You're Safe
npm ls nextin each built image, not only the lockfile, shows a patched release on your line.- A test request with
x-middleware-subrequestset is rejected or stripped at the edge. Run it against your own staging host. aws ec2 describe-instancesshowsHttpTokens: requiredfor the hosts that run Next.js.- Check whether you're already in the leaked data. GitHub code search for your own domain names, hostnames or distinctive environment variable names, alongside the markers the research lists (for example
fast_recon.jsor thewfx-docsbranch), will show if your data was committed to one of these repos. If you find a hit, rotate first. Don't download or share the files. - Check your own GitHub org. The repos belong to hijacked accounts, so look for repositories named like
ci-wk-<number>, workflows you didn't write, orworkflow_dispatchruns nobody started.
Update, December 2: A Second Campaign, React2Keys
On November 30, CloudSEK published research on a separate campaign it calls React2Keys. It uses the same React2Shell bug (CVE-2025-55182), finding Next.js hosts through Certificate Transparency logs. CloudSEK says the campaign took more than 50,000 credentials from over 19,000 victims, including the CI/CD, cloud and AI infrastructure of more than 400 organizations. Those numbers are the researchers' claims, and we haven't verified them. The research doesn't mention React2STEAL, and nothing public links the two campaigns.
The patch and rotation steps above apply unchanged. React2Keys adds one persistence check: CloudSEK reports an attacker SSH key with the comment bluelocale-foothold appended to authorized_keys. On any host that ran a vulnerable Next.js build, search every authorized_keys file for that comment and remove keys you don't recognize. Then review cron jobs and recent SSH logins, and rotate secrets even if the search finds nothing.
What to Watch Next
- A statement from GitHub on takedowns or account recovery.
- New waves. The research describes three since October, and the code has been changed between them.
- Whether React2Shell exploitation gets new CVE or KEV entries, or more scanning infrastructure moves onto CI platforms.
Related Reading
- Two Critical Next.js RCEs: A Self-Hosting Exposure Audit
- What the Vercel Security Incident Should Teach SaaS Teams About Production Readiness
- GitHub Actions Workflow Lockfiles: A Safe Rollout Guide for SaaS
Next Step
Steps 1 to 5 tell you whether you were exposed. If the inventory turns up Next.js apps nobody owns, images that never get rebuilt, or secrets shared across every environment, the fix is a patch policy and a rotation plan, not a one-off upgrade. The Next.js development service covers upgrades and the hardening around them. Bring your list of apps, where each one runs, and its current next version.
Working on a SaaS that's starting to feel fragile?
Talk to an engineer about the parts that break first — without rewriting what already works. We'll recommend focused support or a compact team based on your scope.
Talk to an Engineer