Skip to content

Guide · Ilia Dubovskii · 3 December 2026

React2Shell post-mortem: four days with an attacker inside, and every alert firing

In December 2025 an attacker used React2Shell (CVE-2025-55182) to get code execution in one of our containers on a Friday night, and containment finished on the following Tuesday night: four days. Monitoring did not fail. CPU, outbound traffic and AWS cost alerts all fired, and all of them were explained as a database migration. This is the blameless post-mortem of the React2Shell incident: what happened, why each alert was reasonable to dismiss, and what we changed.

The short version

1. React2Shell in brief

React2Shell is CVE-2025-55182, an unauthenticated remote code execution flaw in React Server Components. The React team disclosed CVE-2025-55182 on 3 December 2025 with a CVSS score of 10.0. One crafted HTTP request to a server function endpoint is enough to run code on the server, and no login is needed.

Component Affected First fixed releases
react-server-dom-webpack, -parcel, -turbopack19.0.0, 19.1.0, 19.1.1, 19.2.019.0.1, 19.1.2, 19.2.1
Next.js (App Router)15.x and 16.x before the fixed releases; 14.3 canaries from 14.3.0-canary.7715.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7, 16.0.7

The first fixed releases are the floor, not the target. Follow-up CVEs in React Server Components were disclosed after 3 December 2025, so upgrade to the latest patch release on your line. Versions, the not-affected list and the upgrade steps are on our React2Shell page, in the React advisory and in NVD.

2. Timeline

The setup was ordinary: apps in containers, in a private network, behind a load balancer. This timeline is by day. Clock times for the React2Shell incident are not published, so there are none here.

When What happened
BeforeDependabot pull requests are open and waiting to be merged.
Friday nightThe attacker gets code execution through React2Shell. The attacker reads the secrets from .env, uses them to reach the database, and tries to export data.
After the attack startsAlerts fire: CPU at 95%, an outbound traffic spike, AWS Cost Anomaly emails. The engineer on call has a plausible explanation, a database migration that week, acknowledges the alerts and goes on with the weekend.
Until MondayNobody looks again.
Tuesday nightContainment finishes: four days with an attacker inside.

3. What the attacker did

The exploit gives code execution as the Node.js process. What came next followed the pattern in the public React2Shell reports, and it has three steps.

  1. Download and run a binary. In the public reports this was a one-liner that fetches a file with busybox wget, makes it executable and runs it. Cryptominers and botnet agents were common payloads.
  2. Read the environment. Environment variables and .env files hold database passwords, cloud keys and API tokens. Reading them costs the attacker nothing, so it happens first.
  3. Use what was found. Connect to the database, call the cloud API with the keys, and try to move data out.

In the React2Shell incident on our side, the attacker read the secrets from .env, used them to reach the database, and tried to export data.

The containers were in a private network behind a load balancer. React2Shell needs only one HTTP request to the application, and the database credentials were in .env inside the container.

4. What our monitoring showed

Three kinds of alert fired during the React2Shell incident. The alerts worked. The explanation given for them was a database migration that week. The table is general reasoning about why a migration would explain each alert. It is not a record of what was said at the time.

Alert What it says Why a migration would explain it
CPU at 95%A container is working hardA database migration would explain a busy container
Outbound traffic spikeMore data than usual is leavingA migration would explain data moving
AWS Cost Anomaly emailsSpend is higher than expectedA migration would explain more compute and more traffic, and both cost money

None of the three alerts said what was happening. A CPU alert says a container is busy. It doesn't say who is making it busy. The alerts measured symptoms, and symptoms have innocent explanations.

5. Contributing factors, and what went well

This is a blameless post-mortem. The engineer on call saw the alerts, had a plausible explanation and acknowledged them. These are the conditions around that decision.

What went well

6. What we changed, and how it performed

We kept every alert and added four things.

The decoy is aimed at step 2 of the attacker's pattern. Reading the environment and trying what is there is the most predictable move after the shell, and nobody legitimate uses a credential that the application itself never reads.

Ten months later: PHP2Shell

In October 2026 an attacker got code execution in one of our PHP containers on AWS Fargate through PHP2Shell, read the environment and tried the decoy AWS key. The alert was in Slack in under a minute, the task was restarted within another minute, and nothing was harmed. That incident has its own write-up: PHP2Shell contained in under two minutes.

React2Shell, December 2025 PHP2Shell, October 2026
First signalCPU, traffic and cost alertsA decoy AWS key was used
Innocent explanation availableYes, a database migrationNo
Who decidedThe engineer on callNobody had to
Time to containmentFour daysUnder two minutes

What the changes do not do

Decoy credentials don't stop the exploit and don't patch anything. A restarted container runs the same image, so the attacker can come back through the same bug until the fixed version is deployed. A decoy also sees nothing if the attacker never touches it. And I can't prove the decoys would have caught the React2Shell attacker in December 2025. The attacker read .env and used the credentials that were there, which is the move a decoy is built for, but that is a reconstruction and not a test.

7. What we would tell another team

  1. Read your last dismissed alert and ask what else could have caused it. If the list of harmless causes is long, the alert can't carry an automatic response.
  2. Put at least one signal in every workload that has no innocent explanation. A decoy credential in the environment is one. The Terraform is in AWS canary credentials: how to set up an IAM honeytoken.
  3. Plant each decoy in one place only. The alert should name the workload without an investigation.
  4. Automate only a response you can undo, and only on that near-certain signal. A restart qualifies.
  5. Keep the alerts. When a decoy is used, the alerts become the context around it.
  6. Merge the dependency pull requests. Decoys shorten the time an attacker stays, and only the patch closes the door.
  7. Write the post-mortem without a name in it. Our alerts worked, and they measured symptoms.

8. Sources

9. FAQ

How long did the React2Shell incident take to contain?

Four days. The attacker got code execution through React2Shell (CVE-2025-55182) on a Friday night in December 2025, nobody looked at the alerts again until Monday, and containment finished on Tuesday night.

Why were the React2Shell alerts dismissed?

The alerts were CPU at 95%, an outbound traffic spike and AWS Cost Anomaly emails. The engineer on call had a plausible explanation, a database migration that week, and acknowledged the alerts. None of the alerts said what was happening.

What did the attacker do after exploiting React2Shell?

The attacker read the secrets from .env, used them to reach the database, and tried to export data. This matches the public React2Shell pattern: download and run a binary, read environment variables and .env files, then use the credentials.

Would a private network have stopped React2Shell?

It did not stop it for us. Our containers were in a private network behind a load balancer. React2Shell needs only one unauthenticated HTTP request to the application.

What changed after the React2Shell incident?

Every container got a decoy AWS access key and a decoy database login, one decoy per task definition, with an automatic restart of the task when a decoy is used. The existing alerts stayed as context. In October 2026 the same setup contained a PHP2Shell attack in under two minutes.

Related

Last checked: 25 November 2026. Written by Ilia Dubovskii, founder of Beamreach. Details are anonymised and simplified.

Related: *2Shell vulnerabilities · How to protect against *2Shell · PHP2Shell contained in two minutes · AWS canary credentials · One Fake Password (talk) · CVE Watch