How Do I Block React2Shell in Minutes?

Necco Ceresani
Necco Ceresani
·12 min read

Fifteen years building engineering platforms, currently focused on advanced AI infrastructure at yeet. I love turning the deeply complex topics into something everyone can understand. I relate deeply with the core yeet philosophy that you can just build things.

Last updated: November 2026

I'm an engineer at yeet, and the part of it this post touches is the programmable firewall, which is one of the options below.

Quick answer. The fix is react 19.3.1, 19.2.9, 19.1.10 or 19.0.9, or next.js 16.4.6 or 15.5.29 if next bundles react for you, followed by a rebuild and a redeploy. React's own advisory says there is no workaround and that upgrading is required. If the rebuild cannot ship tonight, the fastest cover is a rule on each origin host that refuses requests carrying a server action header with a flight payload that reaches for the prototype chain, which needs no rebuild and no restart. React2Shell has been exploited since within hours of disclosure on 3 december 2025 and has been on CISA's KEV list since 5 december, so if the app was online while unpatched, rotate every secret it could read.

React2Shell is CVE-2025-55182, an unauthenticated remote code execution bug in react server components, scored CVSS 10. React's flight deserializer follows property names taken from the request up the javascript prototype chain, as far as the Function constructor, which turns a single HTTP request into code execution with no account and no prior access. The React2Shell reference page carries the affected versions, the patch and the check commands.

This post is about the gap that makes this one harder than the version table suggests: react is not a package you restart, it is a package you rebuild, and the thing most teams put in front of it while they rebuild is the control with the worst coverage.

How do I block React2Shell if I can't rebuild and redeploy tonight?

Five that need no react upgrade, ordered by how fast they land. React and vercel both say upgrading is the only complete fix, and react's advisory puts it plainly: "There is no workaround." So every row buys time rather than resolving anything, and the rebuild is still the work.

RouteHow fast it landsNeeds a rebuild or redeploySees requests that skip your CDN or WAFWhat its own source says
A virtual patch on each origin host, such as the yeet programmable firewallunder a minute to install, 3 to 6 ms to apply the ruleNoYes, east-west includedcleartext only, so TLS terminates upstream of the host
Turn on your provider's React2Shell rule at the edgeminutes, if you already route through oneNoNoreact: "You should not depend on these to secure your app"
Strip x-middleware-subrequest at the edgeminutesNoNocloses the CVE-2025-29927 chain, not React2Shell itself
Enforce deployment protection on preview deploymentsminutes, a config changeNon/a for those hostsvercel: unpatched previews are reachable too
Rotate every secret the app could readhoursNo, but it is a credential rolloutn/avercel: "Assume your vulnerable systems are potentially compromised"

A React2Shell virtual patch on each origin host

This is the only option that blocks the request without rebuilding your application, which is why it goes first when tonight's deploy is not happening. Everything else on the list either needs a release you were trying to avoid or sits at an edge that does not see all of your traffic.

The request has a shape worth matching. It is a POST to any route of the app, carrying one of three headers that route it into server action handling: Next-Action, rsc-action-id or x-action-id. The value does not matter; Next-Action: x is enough. The body is multipart/form-data, and the flight payload in it carries the markers that distinguish an exploit attempt from an ordinary server action: __proto__, :constructor:constructor, $@, and the "status":"resolved_model" structure the deserializer walks.

Put the rule on the origin host rather than at the edge and it sits behind your TLS termination, so it reads the same cleartext react is about to deserialize, and it covers every route into that machine: calls between your own services, requests addressed to the host directly, and preview deployments that were never behind your production edge at all.

Two properties matter for doing this tonight. The rule is data for an already-verified kernel program rather than a new program each time, so it can be exercised against both the attack shape and a corpus of your own server action traffic in CI, with no staging environment. And getting there is quick: installing the runtime on a host takes under a minute, and applying a rule is a compile and an atomic swap into the running program, measured at 3 to 6 milliseconds in our lab, with no rebuild and no process restart. Run it in monitor mode first and look at what it would have blocked, because legitimate server actions use the same headers.

Your provider's edge rule, and what React says about it

Cloudflare, AWS, vercel, akamai, fastly and google cloud armor all shipped React2Shell rules within days of disclosure, and if your traffic already routes through one of them, turning it on costs nothing and should happen before you finish reading this. It is the cheapest action on the list by a wide margin.

What is unusual here is how the advisory describes those rules. React's own wording is that it worked with hosting providers "to apply temporary mitigations" and that "You should not depend on these to secure your app, and still update immediately." That is not the usual vendor caution. It is the maintainers telling you that the control most teams are relying on is not the control they expect to hold.

The reason is in the payload. The flight format is a serialization of structured data, which means the markers a rule looks for can be written more than one way: unicode escapes are a documented evasion class for exactly this reason, and a body that is JSON inside a multipart field has a great deal of freedom in how it spells any given property name. A rule matching the obvious spelling is matching one spelling.

Strip x-middleware-subrequest, and protect your previews

These two are cheap, fast and narrower than they look, which makes them worth doing and worth not over-counting in a status report. Each closes a specific hole next to React2Shell rather than React2Shell itself, and the distinction matters when somebody asks whether the app is covered.

Stripping x-middleware-subrequest at the edge closes CVE-2025-29927, the middleware authorization bypass that the React2STEAL campaign chains with React2Shell. It does nothing about React2Shell itself, and it is still worth doing, because the chain is what turns a route your middleware was protecting into a reachable one. Closing either link breaks the sequence, and this is the link you can close from a config file.

Deployment protection on preview deployments addresses a reliably forgotten exposure. Preview and staging builds run the same unpatched react, are usually reachable from the internet, and often sit outside the production edge where your WAF rule lives, so they combine full vulnerability with no coverage. An attacker does not care which deployment they land on, and a preview environment frequently holds the same database credentials as production.

Rotate the secrets

This is not a mitigation and it belongs on the list anyway, because the timeline makes it necessary rather than precautionary. Everything else here is about preventing the next request; this is about the requests that already arrived while the application was unpatched and reachable.

Vercel's guidance is to "Assume your vulnerable systems are potentially compromised." Exploitation began within hours of the 3 december 2025 disclosure, and the React2STEAL campaign reported on 18 november 2026 was specifically harvesting credentials from servers it reached. If an application was online and unpatched during any part of that window, the question is not whether to rotate but how quickly you can, and a rule you put up tonight does nothing at all about a key that left last week.

Can a WAF block React2Shell, or can attackers still reach my origin?

It blocks the request shapes it recognises, on the traffic that crosses it, and react's advisory is unusually direct about not relying on either of those things. There are two separate gaps underneath that warning, and they fail in different ways, so covering one does nothing about the other.

The coverage gap is the ordinary one, and it applies to every edge control. An edge rule inspects traffic that reaches the edge, which leaves out calls between your own services, requests addressed to an origin host directly by IP, and preview deployments routed outside your production edge entirely. On a next.js estate that last category is routinely larger than teams assume, because preview deployments multiply with branches.

The recognition gap is the one specific to this bug, and it is why react's warning reads the way it does. The exploit marker is a property name inside a serialized payload, and serialized payloads admit many spellings of the same name. Unicode escaping is the documented evasion class for this format. A rule keyed to a literal __proto__ is matching one spelling rather than the behaviour, and the behaviour is what the deserializer ultimately acts on.

Both gaps argue for the same thing: turn the edge rule on, because it is free and covers the largest single slice of inbound traffic, and do not let its presence change your upgrade timeline or your assessment of which deployments are exposed.

Is React2Shell still being exploited a year after disclosure?

Yes, which is what makes it different from a bug you can treat as handled once the advisory stops being news. The exploitation did not taper off after the first wave, and the reason is structural rather than a matter of attacker interest.

CVE-2025-55182 went on CISA's KEV catalog on 5 december 2025, two days after disclosure, with exploitation attempts seen within hours. That part is historical. The part that is not historical is the React2STEAL campaign reported on 18 november 2026, nearly a year later, still finding unpatched react server components and using them to harvest credentials.

The reason the tail is this long is the upgrade shape. React is not a service you restart with a new package; it is a dependency compiled into a build artifact. Patching means a dependency bump, a rebuild and a redeploy for every application, and on an estate with dozens of front ends, the long tail is measured in quarters. The second remote code execution bug in the same code, CVE-2026-126187, means some teams did that work twice.

How do I find every app still shipping a vulnerable react-server-dom build?

By looking at what was built rather than what is installed, because for a compiled dependency those are different questions with different answers. The manifest records an intent; the build artifact records what actually shipped, and only one of them is serving requests.

The thing to check is the resolved version of the react-server-dom-* packages in each application's lockfile, not the react version a developer typed into package.json. On next.js the relevant version is next itself, because next bundles its own copy of react and upgrading react in your manifest does not move it.

Three places a vulnerable build hides, and all three survive a sweep that only reads manifests:

  • Preview and staging deployments built before the upgrade and never rebuilt since.
  • Container images carrying a built artifact, where rebuilding the image is the only way the fix arrives.
  • Applications on next.js 16.0.11, which looks recent and sits inside the affected range of the second bug. The versions to install are 16.4.6 or 15.5.29.

What can't a React2Shell request rule see?

Four things, and on React2Shell they matter more than they would on a bug with a byte-exact indicator, because the marker here is a name inside a structured payload rather than a fixed sequence of bytes on the wire.

Alternative spellings of the marker. The payload is serialized structured data, and unicode escapes are a documented evasion class for exactly this reason. A rule matches the spellings it was written for, and a serialization format offers more than one way to write any given property name.

Traffic inside TLS the host does not terminate. A rule at XDP reads what arrives at the NIC. If TLS terminates inside the node process rather than at an edge, a load balancer or a sidecar, the rule sees ciphertext.

Anything that already happened. If the application was online and unpatched during the exploitation window, a rule applied tonight changes nothing about credentials that already left the building. No request control is retrospective, which is why the rotation step sits on the list beside the blocking ones rather than after them.

The second bug. CVE-2026-126187 is a separate remote code execution issue in the same code, with its own delivery path and its own markers, so a rule aimed at the React2Shell shape does not cover it. The react and next.js versions listed in this post fix both, which is the argument for treating the upgrade as the real work.

Should a React2Shell rule replace the rebuild?

No, and the rebuild is the only complete fix by react's own account. What a rule buys is the interval before it ships, which on this bug is longer than most. React2Shell is the case where the gap between knowing and shipping is widest, because the fix is a rebuild and a redeploy rather than a package upgrade and a restart. That gap is exactly what a host rule is for: put one on each origin tonight, where it sees the preview deployments and service-to-service calls your edge never routes, run it in monitor mode long enough to confirm your own server actions still pass, then enforce. Turn on your provider's edge rule as well, while taking React at its word that you should not depend on it. Then roll react 19.3.1, 19.2.9, 19.1.10 or 19.0.9, or next.js 16.4.6 or 15.5.29, through every application and rebuild every image. And rotate the secrets whatever the rules say, because a control applied tonight does not reach backwards.

Frequently asked questions

How do I block React2Shell without upgrading react?

Refuse requests that carry a server action header with a flight payload reaching for the prototype chain. The markers are a Next-Action, rsc-action-id or x-action-id header on a POST with a multipart/form-data body containing __proto__, :constructor:constructor or $@. Applied as a virtual patch on each origin host it needs no rebuild and no redeploy, and it covers preview deployments and east-west calls an edge rule never routes. The reference page carries the versions that actually fix it.

What is React2Shell?

React2Shell is CVE-2025-55182, an unauthenticated remote code execution bug in react server components, scored CVSS 10, which is the maximum. React's flight deserializer follows property names taken from the request up the javascript prototype chain as far as the Function constructor, so a single HTTP request runs code on the server with no account and no prior access. The React2Shell reference page carries the full record, including the second bug in the same code.

Which react versions fix React2Shell?

React 19.3.1, 19.2.9, 19.1.10 and 19.0.9 for the react-server-dom-* packages, or next.js 16.4.6 and 15.5.29 if next bundles react for you. The first fix shipped on 3 december 2025 in react 19.0.1, 19.1.2 and 19.2.1, and the later releases also close a second remote code execution bug in the same code, CVE-2026-126187, which is why the install targets are higher than the original advisory's. Every one of these needs a rebuild and a redeploy rather than a restart.

Why does React say not to depend on hosting-provider mitigations?

Partially, and react's advisory says explicitly that "You should not depend on these to secure your app." The exploit marker is a property name inside a serialized payload, which can be spelled several ways, and an edge rule only sees traffic crossing the edge. Where a host firewall sits relative to a network firewall covers that split.

Do I need to rotate secrets after React2Shell?

If the application was online and unpatched during the exploitation window, yes. Vercel's guidance is to "Assume your vulnerable systems are potentially compromised," exploitation began within hours of disclosure on 3 december 2025, and the React2STEAL campaign reported in november 2026 was harvesting credentials specifically. No rule applied today changes what already left.

Is React2Shell still being exploited?

Yes. It went on CISA's KEV catalog on 5 december 2025, and the React2STEAL campaign reported on 18 november 2026 was still finding unpatched deployments nearly a year later. The long tail comes from the upgrade shape: react is compiled into a build artifact, so every application needs a rebuild rather than a restart.

Does upgrading react in package.json fix a next.js app?

No. Next.js bundles its own copy of react, so the version in your manifest is not the one serving requests. Upgrade next itself to 16.4.6 or 15.5.29. Note that next.js 16.0.11 looks recent and sits inside the affected range of the second bug, so it is not a release to install today.

What is the difference between React2Shell and CVE-2025-29927?

They are separate bugs that attackers chain together. CVE-2025-29927 is a middleware authorization bypass triggered by the x-middleware-subrequest header, which lets a request reach a route that middleware should have blocked. React2Shell is the remote code execution in the flight deserializer. Stripping that header at the edge closes the bypass and does nothing about React2Shell itself, which is why both appear on the list rather than one standing in for the other.

Sources

Related resources