In the first 24 hours after a critical unauthenticated remote code execution bug is disclosed in a runtime or framework you run (React2Shell, CVE-2025-55182; PHP2Shell, CVE-2026-109618 and CVE-2026-109619), a platform team has five jobs, in this order: confirm the advisory, find every running copy, protect the internet-facing ones, deploy the fix and prove the running process is the fixed one, and look back for a compromise that happened before the patch. This checklist puts those jobs into four time windows, with the exact AWS CLI, Docker and curl commands for each step.

Last checked: 25 November 2026. Written by Ilia Dubovskii, founder of Beamreach. We were hit by React2Shell in December 2025 and by PHP2Shell in October 2026; both timelines are used as worked examples below.

The short version

  • The first hour is for one question: which internet-facing workloads run the affected version? Read the version from the running image, not from the repository.
  • Treat an unauthenticated RCE in a runtime as exploited from hour zero. CISA added PHP2Shell to its Known Exploited Vulnerabilities catalogue on 26 October 2026, nine days after the first recorded exploitation attempt.
  • A merged pull request is not a fix. The step is done when the image digest of the running task matches the patched image and the process reports the fixed version.
  • The look-back starts at the earliest known exploitation, not at the disclosure date. For PHP2Shell that was 17 October 2026, four days before the fixed releases.
  • If an affected version faced the internet during that window and you can't show that no code ran, rotate every credential the workload could read.

The checklist on one screen

Window Goal Done when
First hour Confirm the advisory. List every workload that runs the affected version. Rank by exposure There is a written list of affected workloads with the internet-facing ones at the top, and one named owner
Hours 1 to 4 Hold the line: exploitation status, WAF rule, honeytokens, exposure cut, patch pull requests opened Every internet-facing workload has a WAF rule checked or its exposure cut, an armed honeytoken, and an open fix pull request
Hours 4 to 24 Patch, rebuild, redeploy. Prove the running process is fixed. Look back for compromise Running image digests match the patched images, and the look-back has a written answer: yes, no, or can't tell
After 24 hours Decide on credential rotation. Tell the people who need to know. Close the gaps Rotation is done or declined in writing, the last status note is sent, and the slow steps have owners

The commands below are for Amazon ECS, ECR, Lambda and AWS WAF. Replace the values in angle brackets. They are read-only unless the step says otherwise.

The first hour: confirm, find, rank

1. Read the primary advisory, and work from the CVE ID

For PHP2Shell the primary source is the PHP security advisory. For React2Shell it is the React team's post. Write down four things: affected versions, fixed versions, whether exploitation is reported, and whether any configuration change helps. Names and screenshots move faster than advisories: PHP2Shell details leaked on social media on 20 October 2026, a day before the fixed releases.

2. List what is running

For each ECS cluster, list the running tasks, then print the image and digest of every running container (list-tasks, describe-tasks):

aws ecs list-tasks --cluster <cluster> --desired-status RUNNING \ --query 'taskArns' --output text aws ecs describe-tasks --cluster <cluster> --tasks <task-arn> \ --query 'tasks[].containers[].[name,image,imageDigest]' --output table 

3. Read the version from the image, not the tag

A tag such as php:8.3-fpm says nothing about the patch level. Ask the binary: docker run --rm --entrypoint php <image> -v or docker run --rm --entrypoint node <image> --version (docker run).

4. Find where the version is defined

In each repository, search the Dockerfiles for base images and for OS packages:

grep -rnE '^FROM .*(php|node)' --include='Dockerfile*' . grep -rnE '(apt-get install|apk add).*php' --include='Dockerfile*' . 

For a library bug, read the lockfile, not the manifest: npm ls next react-server-dom-webpack for React2Shell, pip show Brotli brotlicffi for the Python side of Node2Shell.

5. Check Lambda

List each function's runtime (list-functions), then the layers of each function, which is where a custom runtime such as Bref's PHP lives (get-function-configuration):

aws lambda list-functions \ --query 'Functions[].[FunctionName,Runtime,PackageType]' --output table aws lambda get-function-configuration --function-name <function> \ --query 'Layers[].Arn' 

Functions with PackageType Image are container images: check them as in step 3. AWS says that for Lambda-managed runtimes it applies runtime updates automatically by default. Layers and container images are yours to update.

6. If Amazon Inspector is on, ask it too

Filter the findings by the CVE ID (list-findings):

aws inspector2 list-findings \ --filter-criteria '{"vulnerabilityId":[{"comparison":"EQUALS","value":"CVE-2026-109618"}]}' \ --query 'findings[].resources[].id' 

Check the Inspector console as well, and don't let an empty answer replace steps 2 to 5.

7. Rank by exposure

Public load balancers (describe-load-balancers), public Lambda function URLs, where AuthType NONE means a public endpoint (list-function-url-configs), and security groups open to the world (describe-security-groups):

aws elbv2 describe-load-balancers --output table \ --query "LoadBalancers[?Scheme=='internet-facing'].[LoadBalancerName,DNSName]" aws lambda list-function-url-configs --function-name <function> \ --query 'FunctionUrlConfigs[].[FunctionUrl,AuthType]' aws ec2 describe-security-groups \ --filters Name=ip-permission.cidr,Values='0.0.0.0/0' \ --query 'SecurityGroups[].[GroupId,GroupName]' --output table 

A container in a private subnet behind a public load balancer is internet-facing. That was our setup when React2Shell hit us in December 2025. The direction of the bug matters too: Node2Shell (CVE-2026-111497) can be triggered by a response your server fetches, so a worker with no inbound traffic can still be exposed.

Hours 1 to 4: hold the line

1. Check exploitation status, and don't wait for it

Ask the CISA KEV feed and the FIRST EPSS API for the CVE:

curl -s https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json \ | jq '.vulnerabilities[] | select(.cveID == "CVE-2026-109618") | {cveID, dateAdded, dueDate}' curl -s 'https://api.first.org/data/v1/epss?cve=CVE-2026-109618' | jq '.data' 

FIRST describes EPSS as the probability that a CVE will be exploited in the next 30 days, published daily. Both sources lag. The KEV feed gives 5 December 2025 for React2Shell, two days after disclosure, and 26 October 2026 for PHP2Shell, nine days after Amazon's first recorded attempt. A listing confirms the urgency. A missing listing does not lower it.

2. Check that a WAF is attached and which rule version it runs

Look up the web ACL attached to each public load balancer (get-web-acl-for-resource), list the managed rule groups in it with their versions (get-web-acl), and ask for the vendor's current default version (reference):

aws wafv2 get-web-acl-for-resource --resource-arn <load-balancer-arn> aws wafv2 get-web-acl --name <name> --scope REGIONAL --id <id> \ --query 'WebACL.Rules[].Statement.ManagedRuleGroupStatement.[Name,Version]' aws wafv2 list-available-managed-rule-group-versions --vendor-name AWS \ --name AWSManagedRulesKnownBadInputsRuleSet --scope REGIONAL \ --query 'CurrentDefaultVersion' 

If the first command shows no web ACL, check the AWS WAF console as well before you conclude anything. An empty Version means the rule group follows the vendor's default version; a pinned version does not move by itself. For CloudFront use --scope CLOUDFRONT --region us-east-1.

3. Know what the rule can't see

For React2Shell, AWS's bulletin says default version 1.24 of AWSManagedRulesKnownBadInputsRuleSet includes a rule for CVE-2025-55182. The rule's documentation says it inspects the request body only up to the size limit, which is fixed at 8 KB on an Application Load Balancer. For PHP2Shell, the PHP advisory says updating is "the only complete mitigation". A WAF rule buys hours. It does not close the ticket.

4. Verify the honeytokens in the affected workloads

A honeytoken is a decoy credential in the workload's environment that nothing legitimate uses. It is the only layer here that still works if the exploit succeeds. Check that the alert rule is on and where its alerts go (describe-rule, list-targets-by-rule), and that the decoy is in the running task definition (describe-task-definition):

aws events describe-rule --name <rule> --query State aws events list-targets-by-rule --rule <rule> aws ecs describe-task-definition --task-definition <family> \ --query 'taskDefinition.containerDefinitions[].environment[].name' 

The first command should print ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS. Then tell whoever is on call and test-fire the decoy with one aws sts get-caller-identity call made with the decoy key. If you have no honeytoken, today is the day to plant one: AWS canary credentials has the Terraform and the safe test procedure.

5. Cut exposure where you can't patch today

An allowlist or a VPN in front of an admin panel or an internal tool costs minutes. End-of-life versions with no fixed release belong here.

6. Open the fix pull requests now, exposed workloads first

One per repository. Don't batch them with other upgrades.

7. Send the first status note

Four lines: what the bug is (CVE ID and advisory link), how many workloads are affected and how many face the internet, what is done so far, and when the next note comes.

Hours 4 to 24: patch, prove, look back

1. Patch to the latest release on your line, not the first fixed one

After React2Shell, further React Server Components CVEs followed on 11 December 2025, eight days after the first fix. For PHP2Shell the fixed releases are 8.5.12, 8.4.27, 8.3.36 and 8.2.35.

2. Rebuild without the cache

docker build --pull --no-cache -t <image> . makes Docker fetch the base image again instead of reusing a cached layer (docker build). With a floating tag this is the difference between a rebuild and a patch.

3. Redeploy and wait

The first command changes production (update-service, wait services-stable):

aws ecs update-service --cluster <cluster> --service <service> \ --force-new-deployment aws ecs wait services-stable --cluster <cluster> --services <service> 

A PHP-FPM worker or a Node process keeps the old binary loaded until it restarts.

4. Prove the running process is the fixed one

Get the digest of the patched image (describe-images), run the describe-tasks command from the first hour again and compare the imageDigest column. Then ask the process itself (execute-command; the service needs ECS Exec enabled):

aws ecr describe-images --repository-name <repository> \ --image-ids imageTag=<tag> --query 'imageDetails[0].imageDigest' aws ecs execute-command --cluster <cluster> --task <task-id> \ --container <container> --interactive --command "php -v" 

For Node2Shell check node --version: process.versions.brotli reports 1.2.0 on patched builds as well.

5. Look back, starting before the disclosure

Amazon's MadPot report on PHP2Shell puts the rule in one sentence: "Start investigations from the earliest known exploitation, not from the disclosure date." For PHP2Shell that date is 17 October 2026.

What to look for follows from what attackers do after the shell. They download and run a binary, they read environment variables and .env files, and they use the credentials they found.

Start with use of the workload's AWS keys. For an IAM user key that was in the environment, look up its CloudTrail events since the earliest known exploitation (lookup-events) and its last use (get-access-key-last-used):

aws cloudtrail lookup-events \ --lookup-attributes AttributeKey=AccessKeyId,AttributeValue=<access-key-id> \ --start-time 2026-10-17T00:00:00Z \ --query 'Events[].[EventTime,EventName,EventSource]' --output table aws iam get-access-key-last-used --access-key-id <access-key-id> 

Event history covers management events for the last 90 days, one Region at a time, so repeat the lookup with --region for each Region. For a task role, the temporary key IDs change, so search your trail's logs for the role ARN in userIdentity.sessionContext.sessionIssuer.arn and look for source addresses outside AWS.

Then check the rest:

  • Database logins and exports. Logins from addresses that are not your tasks, large reads, dump commands.
  • Outbound traffic and CPU. Downloads from addresses you don't know, sustained CPU, new outbound connections.
  • Alerts someone already acknowledged. In our React2Shell incident the CPU alert (95%), the outbound traffic spike and the AWS Cost Anomaly emails all fired on Friday night and were explained as a database migration. Nobody looked again until Monday. Reread every alert from the window, including the ones with a good explanation.
  • Honeytoken trips. In our PHP2Shell incident the attacker read the environment and tried a decoy AWS key. The alert reached Slack in under a minute and the task was restarted within another minute.

Write the answer down as one of three: evidence of compromise, no evidence with logs covering the whole window, or can't tell because logs are missing. The third answer is treated as the first in the next step.

After 24 hours: rotate, tell people, close the gaps

The rotation decision

Rotate when an affected version was reachable from the internet at any time since the earliest known exploitation and you can't show from logs that no code ran. Rotate everything the workload could read, not only what you saw being used: environment variables, .env files, mounted secrets, the task role's sessions.

For AWS access keys, deactivate before you delete, because deactivation can be undone (update-access-key):

aws iam update-access-key --access-key-id <access-key-id> \ --status Inactive --user-name <user> 

For role sessions, revoke the role's active sessions so credentials issued before now stop working.

For database passwords and API tokens in a Secrets Manager secret that already has rotation configured, run aws secretsmanager rotate-secret --secret-id <secret> (rotate-secret). Everything else is manual, and every consumer of the secret has to be redeployed.

Rotating a shared secret is slow, touches many services and is hard to undo, which is why a person decides it and not a script. What to automate in incident response explains where that line sits.

Communication

Send the same four-line note at fixed times until the last workload is verified, then a closing note with the look-back answer and the rotation decision. Check your legal notification duties early, because some have short deadlines.

Close the gaps

Note how long each step took. The slow ones are the work for next month: an inventory you can query in minutes, a WAF that follows the vendor's default version, a honeytoken in every internet-facing workload, and a patch path that ends with proof. How to protect against *2Shell vulnerabilities covers those four layers.

What this checklist does not cover

The commands in this checklist are for Amazon ECS, ECR, Lambda and AWS WAF. Kubernetes, EC2 fleets, other clouds and appliances that bundle the runtime need their own versions of each step. Palo Alto Networks confirmed that PAN-OS was affected by PHP2Shell, and no grep in your repositories finds that.

The look-back in this checklist is triage, not forensics. CloudTrail event history holds management events only, so reads of S3 objects and most data access are not in it unless a trail records data events. An attacker who used only what was inside the container, and no AWS credential, leaves nothing in CloudTrail at all. A clean look-back means "no evidence found", not "not compromised".

A honeytoken does not stop the exploit and does not see an attacker who never touches the decoy. A WAF rule does not see traffic that doesn't cross the WAF. Keep GuardDuty and your existing alerts: the honeytoken decides that something is an attack, and the alerts explain what happened.

Where Compass fits

Compass is our open-source (Apache 2.0) operations agent for AWS. It shortens three steps of this checklist. Its map answers the first-hour question: which workloads run the affected image, runtime or package, and which of them face the internet. Its patch feature follows CISA KEV and EPSS hourly and opens the fix pull request for exploited or internet-facing findings, then checks CI, the image build and an optional staging canary (docs). Its honeytokens are planted as Terraform pull requests, with two undoable responses: restart an ECS task or deactivate an access key (docs).

What Compass does not do: it is not a WAF, it never merges, it doesn't do the look-back or rotate your secrets, and it is AWS-only. Its edits are plain version changes, so major upgrades and transitive dependencies wait for a person, and it does not bump Lambda runtimes.

FAQ

What should a DevOps team do first when a critical RCE is disclosed?
Read the primary advisory for the affected and fixed versions, then list every running workload that has the affected version, with the internet-facing ones first. On Amazon ECS, aws ecs describe-tasks prints the image and digest of each running container, and running the binary inside the image (php -v, node --version) gives the real version.

Should we wait for a CISA KEV listing before patching a critical RCE?
No. KEV confirms exploitation after the fact. CISA added PHP2Shell (CVE-2026-109618) on 26 October 2026, nine days after Amazon's honeypots recorded the first attempt and five days after the fixed PHP releases. Treat an unauthenticated RCE in a runtime as exploited from the day you hear of it.

How do I confirm that a patch is really deployed on ECS?
Compare digests. aws ecr describe-images gives the digest of the patched image, and aws ecs describe-tasks gives the imageDigest each running container uses. If they match, and the binary inside the task reports the fixed version, the patch is deployed. A merged pull request or a green pipeline does not prove it.

How far back should we look for compromise after a critical RCE?
To the earliest known exploitation, not to the disclosure date. For PHP2Shell, Amazon reported an attempt on 17 October 2026, four days before the fixed releases. Check CloudTrail for use of the workload's credentials, database logs, outbound traffic, and any alert from that window that was acknowledged with an innocent explanation.

When should we rotate credentials after an RCE disclosure?
Rotate when an affected version faced the internet during the exploitation window and logs can't show that no code ran. Rotate everything the workload could read, starting with cloud keys and database passwords, because reading environment variables and .env files is the attacker's first move after the shell.

Sources

This article was first published on beamreach.ai. It was drafted with AI assistance and reviewed by the author.

New critical and exploited vulnerabilities, one page each with checks and fixes: CVE Watch.