React2STEAL Uses GitHub Actions to Exploit React2Shell and Steal Credentials

· Original article ↗

Summary

Researchers detail an active GitHub Actions campaign exploiting React2Shell and a Next.js middleware bypass to steal server secrets and publish them in public repositories; they identified at least 1,281 victim hostnames.

Key points

  • Researchers identified 45 React2STEAL repositories that use GitHub Actions to scan React and Next.js hosts and attempt exploitation of CVE-2025-55182 and CVE-2025-29927.
  • The payload can collect environment variables, credentials, configuration files and cloud secrets; researchers say recovered records are evidence it ran on victim servers.
  • Stolen data was committed to public repositories. Researchers found about 7.4 GB of results in 11 repositories still accessible when they checked.
  • The repositories contained results for at least 1,281 victim hostnames across about 1,100 domains; one repository's target lists held about 18 million unique hostnames.
  • Many React2STEAL accounts also showed evidence of wfx-loot activity, but the researchers could not determine whether one operator ran both campaigns or whether the same accounts were used by separate operators.
  • The operator is unknown; the researchers identified the GitHub account dascxzcw as their best lead, while noting that this does not establish who controlled it.
  • Defensive guidance includes checking logs for the specified middleware-bypass and metadata-service request patterns, rotating potentially exposed secrets, blocking the bypass header, and upgrading affected React or Next.js applications.

Article Details

Attack Vectors
  • React2STEAL repositories used GitHub Actions workflows on GitHub-hosted Ubuntu runners to scan supplied hostname lists for Next.js servers. The evidence suggests the workflows ran through repository-owner accounts whose tokens were held by someone else, though how the tokens were obtained is unknown.
  • The scanners attempted remote code execution through React2Shell (CVE-2025-55182), using several request variations, and tried to bypass Next.js middleware authorization with the x-middleware-subrequest header (CVE-2025-29927).
  • The exploitation script used the Next.js /_next/image endpoint for SSRF requests to retrieve cloud instance metadata and AWS role credentials.
  • When exploitation succeeded, attacker-supplied JavaScript ran in the victim's Node.js application, collecting environment variables, credentials, system information, and—in newer variants—complete .env and configuration files. The payload also tested harvested AI-provider keys with live requests.
  • The workflows saved stolen data on the GitHub runner and automatically committed it to the same public repositories, leaving results in repository history. Telegram delivery was built in but disabled by default.
  • The article describes wfx-loot as a separate campaign that used hijacked GitHub accounts to probe repositories and steal CI secrets. Some accounts overlapped with React2STEAL, but the evidence does not establish whether the campaigns had the same operator.
Defensive Notes
  • Upgrade affected React or Next.js installations to fixed versions; the article does not specify fixed-version numbers.
  • Review request and WAF logs for repeated x-middleware-subrequest headers and /_next/image?url= requests targeting the cloud metadata address.
  • At a proxy or WAF, strip or reject incoming x-middleware-subrequest headers until affected applications are upgraded.
  • Enforce IMDSv2 to reduce exposure of instance credentials through SSRF.
  • If suspicious requests are found, rotate every secret reachable by the server process, treat its configuration files as disclosed, and review usage of exposed AI-provider keys.
  • For potentially compromised GitHub accounts, revoke tokens and app grants and inspect repositories, branches, and workflow runs for unrecognized activity.
  • Restrict CI-runner egress where practical. Deleting or privatizing an affected repository does not remove copies, forks, caches, or exposed secrets; rotate the secrets and review their use.

Indicators of compromise

TypeIndicatorContext
SHA1ee6e5addfe591923fc385553cb66cf0d25634a6bGit blob hash for the wfx-loot probe file found in React2STEAL repository branches; the article identifies the file as a campaign indicator.

MITRE ATT&CK

T1005 · Data from Local SystemThe payload collected environment data, configuration contents, credentials, and system information from victim servers.T1016 · System Network Configuration DiscoveryThe payload collected network-interface and IP information from victim servers.T1020 · Automated ExfiltrationThe workflow automatically saved and pushed batches of collected victim data after scans.T1049 · System Network Connections DiscoveryVictim records included listening-port information gathered by the payload.T1057 · Process DiscoveryVictim records included process information collected by the payload.T1059.007 · JavaScriptThe fast_recon.js payload executed JavaScript in victim Node.js applications to collect data and test harvested credentials.T1078.004 · Cloud AccountsWorkflow runs were dispatched through repository-owner GitHub accounts; the article assesses that someone else likely held some owners' tokens, while noting token acquisition and operator identity remain unconfirmed.T1082 · System Information DiscoveryCollected victim data included platform, kernel release, hostname, CPU, and memory details.T1083 · File and Directory DiscoveryThe payload searched for cloud credential files, Kubernetes tokens, .env files, and configuration files.T1190 · Exploit Public-Facing ApplicationThe scanners attempted to exploit React2Shell and the Next.js middleware authorization bypass on exposed applications.T1552.001 · Credentials In FilesThe payload collected credentials from .env and configuration files on victim servers.T1552.005 · Cloud Instance Metadata APIAn SSRF request through /_next/image queried cloud instance metadata for an IAM role and its temporary AWS credentials.T1560.002 · Archive via LibraryThe script used Python's archive functionality to package scan results into ZIP files.T1567.001 · Exfiltration to Code RepositoryStolen data was exfiltrated by committing it to the same public GitHub repositories used to run the workflows.T1595.002 · Vulnerability ScanningThe framework scanned hostname lists to identify likely Next.js targets and test them for known vulnerabilities.

CVE

People

Threat Actors

Vendors

Products

Tools

Related Articles