This is the long version of Weekly Recon 032, Unpatched Next.js servers are leaking keys to GitHub. It has the full attack details, the AWS WAF test with its log lines, the Node shield and the agent prompt.

TL;DR: React2STEAL is an attack campaign that breaks into unpatched Next.js servers, copies their secrets and commits them to public GitHub repos. OpenSourceMalware counted at least 1,281 victim hostnames. It runs from GitHub Actions in GitHub accounts that look hijacked, and it goes after two bugs fixed in 2025. React2Shell (CVE-2025-55182) lets one request run code on a server that uses React Server Components. CVE-2025-29927 lets a request skip Next.js middleware, so login checks done there get skipped too. Karina Reaño, a threat intelligence lead, found it, and OpenSourceMalware documented it on November 18.

CVE-2025-55182, the React2Shell bug this campaign uses, is an old vulnerability. Lachlan Davidson reported it, and the React team disclosed it on December 3, 2025, and published the fix to npm the same day. I am writing about it because I wanted to try detection and virtual patching: building a small Node shield as a stopgap, and testing how AWS WAF behaves on a padded request. Allam Rachid and Allam Yasser found the middleware bypass, CVE-2025-29927, per the Next.js advisory.

If you run Next.js or another React Server Components app, patch both bugs first. For React2Shell, move to the latest patched release in your line (for example 15.5.7 or newer if you're on 15.5). For the middleware bypass (CVE-2025-29927), the Next.js advisory lists 15.2.3 as the 15.x fix, along with 14.2.25, 13.5.9 and 12.3.5. If you're still on 15.0 or 15.1, the newest release in that line is still below 15.2.3, so staying there leaves that bypass open. Move to 15.2.6 or later, which closes both bugs. Then check your logs for the scanner, turn on IMDSv2, and rotate every secret that server could read if anything matches.

Attack of the week: React2STEAL turns GitHub runners into a scanner for old Next.js servers

Karina Reaño found the first 38 of these repos on her own and shared her research with OpenSourceMalware for review. OpenSourceMalware published "React2STEAL Uses GitHub Actions to Exploit React2Shell" on November 18, 2026, and its co-founders Jenn Gile and Paul McCarty talked it through on The OpenSourceMalware Show #30 on November 19. Quincy Castro wrote "React2STEAL: What it is and what to check" for Chainguard, and Dwayne McDaniel covered it for GitGuardian on November 20.

OpenSourceMalware took the count to 45 repos named ci-wk-<number>, created in three waves starting October 22. Each one holds a workflow, .github/workflows/scan.yml, that the operator starts with a GitHub API call, and it runs on GitHub's own runners. The runner picks out Next.js hosts from a hostname list and tries seven versions of the React2Shell request, including one with 8 KB of padding in front of the body. If those fail, it tries the middleware bypass. It also asks the Next.js image endpoint, /_next/image, to fetch the cloud metadata address. If the server allows that, the reply holds the server's temporary AWS role credentials. The five repos from the third wave, on November 14, were only staged and had no results when OpenSourceMalware looked.

When the React2Shell exploit works, a script called fast_recon.js runs inside the victim's Node.js process. OpenSourceMalware says it collects the process environment, cloud credential files, Kubernetes tokens and .env files, and the newer version returns full config files up to 300 KB per victim. It looks for AI keys under 28 environment variable names across ten providers and tests each one with a small real request, like gpt-4o-mini capped at 20 tokens. Chainguard notes those calls come from your server, so they look like your normal usage and can show up as charges. OpenSourceMalware found the workflow then commits the results to its own public repo. The code also has a Telegram bot set up, with sending off by default.

When OpenSourceMalware checked on November 17, new results were still landing about every 11 minutes. It found database URLs, Stripe keys and AI provider keys were the most common credentials, and many victim hostnames were dev, staging or admin hosts. GitGuardian warns that copies can stay in forks, clones and scrapers after a repo is taken down.

OpenSourceMalware treats the GitHub account owners as victims as well. wfx-loot is a separate attack that has been stealing CI secrets with hijacked GitHub accounts since November 10. Of the 39 React2STEAL repos OpenSourceMalware could open, 25 had wfx-loot's probe branch, wfx-docs. The five November 14 repos belong to four owners, and three of them had already been hit by wfx-loot. How the tokens were stolen is still unknown.

Chainguard says the attacker wrote their own workflow and did not tamper with any npm package, GitHub Action or maintainer account.

Ship this week

  • ☐ Check the Next.js version each app runs in production, from the deployed build or image. The Next.js advisory lists 15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7 and 16.0.7 as the first patched stable releases for React2Shell. Later releases fixed related bugs, so move to the newest patch for your version, and follow the advisory's own steps if you run a canary build. For the middleware bypass, the CVE-2025-29927 advisory lists 15.2.3 as the 15.x fix, along with 14.2.25, 13.5.9 and 12.3.5. 15.0.5 and 15.1.9 fix React2Shell, but they are still below 15.2.3, so if you're on 15.0 or 15.1 you need to move to 15.2.6 or later to close both. For other React Server Components frameworks, check react-server-dom-webpack, react-server-dom-turbopack and react-server-dom-parcel in the lockfile or SBOM, since Chainguard notes a transitive copy can pin an old version.

  • ☐ Use the request markers in Chainguard's table to search your access and WAF logs: any x-middleware-subrequest header (Chainguard lists it repeated five times), /_next/image?url= requests pointing at 169.254.169.254, and a Next-Action: x header with the multipart boundary bissa_cve_boundary (one variant randomizes the boundary). A match means something probed you. Check application and egress logs for signs it worked.

  • ☐ Look at egress logs and AI provider usage for calls from your web servers that you didn't expect. OpenSourceMalware says the payload sends them with a desktop Chrome 126 user agent.

  • ☐ If the server was reachable while unpatched, rotate everything its process could read after you patch, including database URLs, Stripe and cloud keys and every other value in its environment. A match in your logs makes it urgent, and an empty search doesn't clear it.

  • ☐ If your app sets NEXT_PUBLIC_OPENAI_API_KEY, rotate it anyway. OpenSourceMalware notes that Next.js can build NEXT_PUBLIC_ values into the JavaScript it sends to browsers, so treat that key as already public.

  • ☐ Strip or reject the x-middleware-subrequest header at your proxy, CDN or WAF until you upgrade.

  • ☐ On EC2, require IMDSv2, the metadata service mode that needs a session token, so tokenless requests, like the one the image endpoint trick sends, get refused. Limit images.remotePatterns in next.config to hosts you use. In my sandbox, a wildcard pattern let Next.js 15.5.6 fetch the metadata address, and requiring IMDSv2 made the metadata service refuse it (details below).

This lists running instances that still accept IMDSv1. Check that the workload works with IMDSv2, then switch it over and confirm the state shows applied:

aws ec2 describe-instances \
  --filters 'Name=instance-state-name,Values=running' \
            'Name=metadata-options.http-endpoint,Values=enabled' \
            'Name=metadata-options.http-tokens,Values=optional' \
  --query 'Reservations[].Instances[].InstanceId' --output text

aws ec2 modify-instance-metadata-options \
  --instance-id YOUR_INSTANCE_ID --http-tokens required

aws ec2 describe-instances --instance-ids YOUR_INSTANCE_ID \
  --query 'Reservations[].Instances[].MetadataOptions' --output table

If you own GitHub accounts or an org, OpenSourceMalware and Chainguard say to look for repos you didn't create, a wfx-docs branch, and pull requests titled "docs: dependency audit notes". If you find any, treat the account as taken over, revoke its tokens and OAuth app grants, and rotate the secrets in its repos. These two read-only checks look for scanner repo names and matching pull request titles in repos you own. Check for wfx-docs branches separately, and keep in mind renamed or deleted repos and result limits can hide matches:

gh repo list YOUR_OWNER --limit 1000 --json name \
  --jq '.[].name | select(test("^ci-wk-[0-9]+$"))'

gh search prs '"docs: dependency audit notes"' --owner YOUR_OWNER \
  --match title --limit 100 --json title,url \
  --jq '.[] | select(.title == "docs: dependency audit notes") | .url'

Before you reach for a stopgap

The fix is the patch, and it has been out since December 3, 2025. Upgrade react-server-dom-webpack, -parcel or -turbopack to 19.0.1, 19.1.2 or 19.2.1, or move Next.js to the matching patch for your line (15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7 or 16.0.7). It is close to a one-line change, and nothing below replaces it. OpenSourceMalware and Chainguard both say the same thing: upgrade. Everything here is defense in depth for the window before the patch lands on every host, and a way to see whether someone is already trying. If you can upgrade today, do that and skip the rest.

Upgrades still take time to test and roll out across a fleet, so I wanted to see how much a stopgap buys you in that window. On November 25 I ran a test in my own AWS sandbox against a Next.js 15.5.6 and React 19.1.1 app behind an internal load balancer. I only sent harmless requests shaped like the exploit. I did not reproduce the remote code execution itself from scratch this week. That run was blocked, so the sandbox has no evidence of a working exploit. The WAF and shield numbers below come only from those harmless probes.

AWS WAF

With AWS's managed Known Bad Inputs rule group on, which holds the React2Shell rule ReactJSRCE_BODY, my 76-byte test request got a 403. On November 25, the same request with 9,000 bytes of padding in front, 9,079 bytes in total, got a 200 and reached the app. That run kept only the client side results.

On November 27 I reran it in the same sandbox account, inside a VPC with no internet gateway and an internal ALB, and kept the WAF logs this time. Every request ran 3 times with the same result:

Body inspection limit

Request

WAF action

Bytes WAF read

Reached the app

8 KB (ALB default)

76 B

Block, ReactJSRCE_BODY

76

No

8 KB (ALB default)

9,079 B

Allow

8,192

Yes

8 KB (ALB default)

17,079 B

Allow

8,192

Yes

16 KB

76 B

Block, ReactJSRCE_BODY

76

No

16 KB

9,079 B

Block, ReactJSRCE_BODY

9,079

No

16 KB

17,079 B

Allow

16,384

Yes

These are the WAF log lines for the two padded requests that got through:

{"action":"ALLOW","terminatingRuleId":"Default_Action","matched_rule":null,
 "requestBodySize":9079,"requestBodySizeInspectedByWAF":8192,"labels":[]}

{"action":"ALLOW","terminatingRuleId":"Default_Action","matched_rule":null,
 "requestBodySize":17079,"requestBodySizeInspectedByWAF":16384,"labels":[]}

This is a known weakness of the default inspection limit. ReactJSRCE_BODY reads up to the limit and then continues, so a payload placed past the limit doesn't match. Raising the limit to 16 KB closed the 9,079-byte case and moved the window to 16 KB. It didn't close padding in general.

I set the 16 KB limit with boto3 1.44.12. The aws-cli 2.41.0 I had didn't know the new setting yet, and the Terraform AWS provider had no clean way to set it, so I applied it outside Terraform. If you manage WAF across accounts with Firewall Manager, Terraform or CloudFormation, check that your tool can set it before you count on it. I didn't test Firewall Manager or CloudFormation.

AWS's docs, after a change dated November 25, 2026, say you can raise the ALB limit to 16, 32, 48 or 64 KB in the web ACL association config. CloudFront, API Gateway, Cognito, App Runner and Verified Access default to 16 KB and can also go up to 64 KB. AppSync stays fixed at 8 KB. Inspecting bodies past the default for the resource costs extra. If you raise it, AWS charges extra only for requests whose body is larger than the default. Through January 31, 2027, that's $0.30 per million requests for each additional 16 KB analyzed. AWS says the separate surcharge goes away with new pricing from February 1, 2027. Raise the limit, or add an oversize-body rule, and don't rely on the managed rule alone, because it still uses Continue on anything past the limit. Keep the patch on schedule. OpenSourceMalware's published code shows React2STEAL's padded variant puts 8,192 bytes of filler in front of the payload. I tested my harmless request, so I can't say for sure the attacker's one gets through the same way.

More sandbox tests (November 29)

I ran three more checks in the same sandbox setup, with the same harmless decoy and no exploit. Each oversize-rule case ran 3 times, and the image and marker requests ran once each. The raw results are in my lab notes.

The oversize-body rule. I added the count-oversize-server-actions rule shown further down at priority 0, first in Count mode and then as a Block version. Small normal Server Action calls (39, 638 and 3,363 bytes) and plain page loads were never counted or blocked. These are the WAF results for the padded requests:

Body inspection limit

Oversize rule

9,079 B padded

17,079 B padded

8 KB (ALB default)

Count

Allowed, counted by the rule

Allowed, counted by the rule

16 KB

Count

Blocked by ReactJSRCE_BODY

Allowed, counted by the rule

8 KB (ALB default)

Block

Blocked by the rule

Blocked by the rule

16 KB

Block

Blocked by ReactJSRCE_BODY

Blocked by the rule

In Count mode, the rule counted every padded request the managed rule group let through, and in Block mode it blocked them. I didn't test real Server Action bodies above the limit, like file uploads. The Block version would block those too, which is why I'd start in Count mode.

IMDSv2 and the image endpoint. I asked /_next/image to fetch http://169.254.169.254/latest/meta-data/instance-id and ami-id, never the credentials path:

  • With the default image config, Next.js 15.5.6 refused the URL with "url" parameter is not allowed.

  • With a wildcard remote pattern (protocol: 'http', hostname: '**'), a misconfig I set up on purpose, and IMDSv1 allowed, it fetched the URL and answered The requested resource isn't a valid image. That fits the metadata service answering with something that isn't an image.

  • With the same wildcard and http-tokens required, it answered "url" parameter is valid but upstream response is invalid, because the metadata service refused the tokenless request with a 401.

Next.js didn't refuse the link-local metadata address once the pattern allowed it, so the default image config and IMDSv2 both matter. Next.js returned only an error string here, so I can't say what an attacker could read back. I didn't test containers or the hop limit.

Searching logs for the markers. I sent one decoy with each marker, then searched. In the WAF logs, CloudWatch Logs Insights found all three. AWS's managed Known Bad Inputs rule group allowed all three decoys. These are the queries I used on the WAF log group, shortened to the fields and filter lines:

fields @timestamp, httpRequest.uri, action
| filter @message like /(?i)"name":"x-middleware-subrequest"/

fields @timestamp, httpRequest.uri, httpRequest.args, action
| filter httpRequest.uri = "/_next/image" and httpRequest.args like /169\.254\.169\.254/

fields @timestamp, httpRequest.uri, action
| filter @message like /(?i)"name":"next-action","value":"x"/ and @message like /bissa_cve_boundary/

In the ALB access logs, Athena found only the image request, with a query like WHERE request_url LIKE '%/_next/image?%' AND request_url LIKE '%169.254.169.254%'. The two header markers aren't there, because ALB access logs don't record request headers. If WAF logging is off, an empty search tells you very little.

Shirudo

I also looked at Shirudo, which OpenAI and Cisco released on November 23 as a pre-release open source project. With eBPF, Shirudo loads small signed patches, which it calls upatches, into a running Linux system, so you can block a vulnerable path without a restart. Thomas Graf and Liz Rice at Isovalent say it grew out of Tetragon. The repo documents eBPF upatches and Java agent upatches, and lists no ready-made Node.js one. Its README says production hosts need a Linux kernel with the signed-loader ABI and Shirudo's kernel patches, plus TPM 2.0, and the quickstart VM uses a software TPM. I haven't run it yet. At best it covers the days until the upgrade ships.

Node shield

I also built a small Node shield that follows Shirudo's idea. It is a stopgap for the days before you patch. I load it with NODE_OPTIONS="--require /path/to/shield.js", and it checks the body of Server Action requests for the shapes React2Shell needs, like a path through constructor or __proto__, before Next.js handles them. In the same sandbox run it blocked all 4 of my test probes, one of them a body-size test, plus a separate 9,026-byte padded probe, because it reads the body up to its 1 MiB cap. It let all 3,000 normal Server Action calls through, and 600 of those then got errors from the demo app itself, the same as without the shield. The median request took 0.376 ms longer in that one run, and my normal traffic came from only 3 request shapes. It only knows the shapes this bug uses, so treat a block as an alert that someone is probing you, and patch. The shield doesn't see requests when Node itself handles TLS or HTTP/2, and it blocks normal JSON that uses keys like prototype. My shield isn't signed or attested the way Shirudo's upatches are.

Two AI code reviews of the shield, one with Claude and one with Codex, found a gap, and my agent reproduced it on a fresh shielded server. When a POST has no next-action header, which is how the no-JavaScript form path for Server Actions works, the shield only inspects it if the Content-Type exactly matches multipart/form-data or application/x-www-form-urlencoded. A body sent as Multipart/Form-Data, or as application/x-www-form-urlencoded; charset=UTF-8, carried the same $1:constructor:name marker the shield blocks, got a 200 and reached the app without being inspected. Requests that send a next-action header, which normal JavaScript Server Action calls do, were inspected in both reviews. The same reviews found that benign text containing a literal "constructor": or "prototype": can be blocked. So the 3,000-call result holds for my 3 request shapes and doesn't mean zero false positives in general. Until the shield normalizes the Content-Type and treats a $ACTION_ID_ form field like a next-action header, keep it as a stopgap and patch. I haven't fixed this yet.

Ship this week

  • ☐ Patch first. Upgrade the React server packages to 19.0.1, 19.1.2 or 19.2.1, or Next.js to the matching patch for your line, and rotate any secret the server could reach while it was exposed. A stopgap only buys time until this is done.

  • ☐ If you rely on AWS WAF for React2Shell, don't rely on the managed rule alone. On an Application Load Balancer, raise the web ACL's body inspection limit from the 8 KB default (in my rerun, 16 KB blocked a 9,079-byte padded request and still let a 17,079-byte one through) (AWS's docs say 16, 32, 48 or 64 KB, and bodies past the default cost extra), or add an oversize-body rule that blocks or labels requests past the limit. CloudFront and similar default to 16 KB and can also go to 64 KB. AppSync stays fixed at 8 KB, so an oversize rule is the option there. Then count requests with a Next-Action header whose body is bigger than the limit you set. Start in Count mode, since big file uploads can trip it. Treat a hit as a signal to finish patching.

  • ☐ Write down which servers would sit behind a stopgap and for how many days, then put the upgrade date next to each one.

This is the rule I'd start from. I tested it on November 29 (see More sandbox tests above). The 65,536 size is the 64 KB maximum, so the rule only counts bodies past whatever limit you set. Put it ahead of any rule that blocks or allows the same traffic:

{
  "Name": "count-oversize-server-actions",
  "Priority": 0,
  "Action": { "Count": {} },
  "Statement": { "AndStatement": { "Statements": [
    { "SizeConstraintStatement": {
        "FieldToMatch": { "SingleHeader": { "Name": "next-action" } },
        "ComparisonOperator": "GT", "Size": 0,
        "TextTransformations": [ { "Priority": 0, "Type": "NONE" } ] } },
    { "SizeConstraintStatement": {
        "FieldToMatch": { "Body": { "OversizeHandling": "MATCH" } },
        "ComparisonOperator": "GT", "Size": 65536,
        "TextTransformations": [ { "Priority": 0, "Type": "NONE" } ] } }
  ] } },
  "VisibilityConfig": { "SampledRequestsEnabled": true,
    "CloudWatchMetricsEnabled": true, "MetricName": "oversizeServerActions" }
}

Agent prompt

You can use a coding agent to check which of your apps run affected versions. I haven't tested this prompt, so check what it flags by hand. Start a new session with read-only access to a checked out copy of each repo. Don't give it cloud credentials, and don't let it run install or build scripts from the repo.

Ask it to look for these:

  1. The resolved next version in each lockfile (package-lock.json, pnpm-lock.yaml, yarn.lock), and any react-server-dom-webpack, react-server-dom-turbopack or react-server-dom-parcel version. Have it compare each one to the React and Next.js advisories and mark it as affected, fixed, outside the affected range, or unsure.

  2. Apps that use React Server Components with the App Router, which is what React2Shell hits. The Next.js advisory says the Pages Router and the Edge Runtime aren't affected.

  3. Auth checks in middleware.ts or middleware.js, with the Next.js version, since CVE-2025-29927 skips middleware. The advisory lists fixes in 12.3.5, 13.5.9, 14.2.25 and 15.2.3, a workaround for 11.x, and says apps hosted on Vercel are protected.

  4. images.remotePatterns or images.domains in next.config that allow any host, like a ** hostname.

  5. Environment variable names the payload looks for, like OPENAI_API_KEY and ANTHROPIC_API_KEY, and any secret in a NEXT_PUBLIC_ variable.

  6. Dockerfiles and deploy configs that show which image or host each app runs on, so you can match a repo to a server.

Have it report every hit as file:line, with the variable name and no part of any value. A lockfile tells you what the repo would build, so check the deployed image or host for the version that's running.

An agent can miss files or flag things that don't matter, so open each hit yourself before you patch or rotate.

Ship this week

Run it on the repos behind your internet-facing apps, starting with dev, staging and admin hosts, and patch the ones marked affected first.

Reply and tell me what your scan found, even if it's "all patched". I'll share the anonymized count next week.

Until next Tuesday,
R.K.