React2Shell (CVE-2025-55182) Exploitation Attempt

This rule detects exploitation attempts targeting CVE-2025-55182, a critical remote code execution vulnerability in React Server Components (RSC) Flight protocol. The vulnerability allows attackers to execute arbitrary code on the server by sending specially crafted deserialization payloads that exploit prototype chain traversal to access the Function constructor. This rule focuses on high-fidelity indicators of active exploitation including successful command execution responses and prototype pollution attack patterns.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2025/12/04"
  3integration = ["network_traffic"]
  4maturity = "production"
  5updated_date = "2025/12/05"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10This rule detects exploitation attempts targeting CVE-2025-55182, a critical remote code execution vulnerability in
 11React Server Components (RSC) Flight protocol. The vulnerability allows attackers to execute arbitrary code on the
 12server by sending specially crafted deserialization payloads that exploit prototype chain traversal to access the
 13Function constructor. This rule focuses on high-fidelity indicators of active exploitation including successful command
 14execution responses and prototype pollution attack patterns.
 15"""
 16from = "now-9m"
 17index = ["logs-network_traffic.http*"]
 18language = "eql"
 19license = "Elastic License v2"
 20name = "React2Shell (CVE-2025-55182) Exploitation Attempt"
 21note = """## Triage and analysis
 22
 23### Investigating React2Shell (CVE-2025-55182) Exploitation Attempt
 24
 25This rule detects exploitation attempts targeting CVE-2025-55182, a critical remote code execution vulnerability in React's Flight protocol used by Next.js and other RSC implementations. The vulnerability stems from insecure prototype chain traversal in the Flight deserializer, allowing attackers to access `__proto__`, `constructor`, and ultimately the `Function` constructor to execute arbitrary code.
 26
 27### Possible investigation steps
 28
 29- Examine the full HTTP request body to identify the specific attack payload and command being executed.
 30- Check the response body for `E{"digest":"..."}` patterns which contain command output from successful exploitation.
 31- Identify the target application and verify if it runs vulnerable React (< 19.1.0) or Next.js (< 15.3.2) versions.
 32- Review the source IP for other reconnaissance or exploitation attempts against web applications.
 33- Check for the `Next-Action` header which is required for the exploit to work.
 34- Correlate with process execution logs to identify if child processes (e.g., shell commands) were spawned by the Node.js process.
 35
 36### False positive analysis
 37
 38- Legitimate React Server Components traffic will NOT contain `__proto__`, `constructor:constructor`, or code execution patterns.
 39- Security scanning tools like react2shell-scanner may trigger this rule during authorized penetration testing.
 40- The combination of prototype pollution patterns with RSC-specific syntax is highly indicative of malicious activity.
 41
 42### Response and remediation
 43
 44- Immediately update affected applications: React >= 19.1.0, Next.js >= 15.3.2.
 45- Block the source IP at the WAF/reverse proxy if exploitation is confirmed.
 46- If HTTP 500 or 303 responses with `digest` output were observed, assume successful code execution and investigate for compromise.
 47- Review server logs for evidence of command execution (file creation, network connections, process spawning).
 48- Implement WAF rules to block requests containing `__proto__` or `constructor:constructor` in POST bodies.
 49"""
 50references = [
 51    "https://www.wiz.io/blog/critical-vulnerability-in-react-cve-2025-55182",
 52    "https://github.com/assetnote/react2shell-scanner",
 53    "https://slcyber.io/research-center/high-fidelity-detection-mechanism-for-rsc-next-js-rce-cve-2025-55182-cve-2025-66478/",
 54    "https://github.com/msanft/CVE-2025-55182",
 55]
 56risk_score = 73
 57rule_id = "a8f7e9d4-3b2c-4d5e-8f1a-6c9b0e2d4a7f"
 58severity = "high"
 59tags = [
 60    "Domain: Network",
 61    "Domain: Application",
 62    "Domain: Web",
 63    "Use Case: Threat Detection",
 64    "Use Case: Vulnerability",
 65    "Tactic: Initial Access",
 66    "Tactic: Execution",
 67    "Data Source: Network Packet Capture",
 68    "Resources: Investigation Guide",
 69]
 70timestamp_override = "event.ingested"
 71type = "eql"
 72
 73query = '''
 74network where http.request.method == "POST" and
 75(
 76    // Successful CVE-2025-55182 RCE - command output in digest
 77    (
 78        http.response.status_code in (500, 303) and
 79        http.response.body.content like~ "*E{\"digest\"*" and
 80        http.request.body.content regex~ """.*\$[0-9]+:[a-zA-Z_0-9]+:[a-zA-Z_0-9]+.*"""
 81    ) or
 82    // Prototype pollution attempts in RSC Flight data (never legitimate)
 83    (
 84        http.request.body.content regex~ """.*\$[0-9]+:[a-zA-Z_0-9]+:[a-zA-Z_0-9]+.*""" and
 85        (
 86            http.request.body.content like~ "*__proto__*" or
 87            http.request.body.content like~ "*prototype*"
 88        )
 89    )
 90)
 91'''
 92
 93
 94[[rule.threat]]
 95framework = "MITRE ATT&CK"
 96[[rule.threat.technique]]
 97id = "T1190"
 98name = "Exploit Public-Facing Application"
 99reference = "https://attack.mitre.org/techniques/T1190/"
100
101
102[rule.threat.tactic]
103id = "TA0001"
104name = "Initial Access"
105reference = "https://attack.mitre.org/tactics/TA0001/"
106[[rule.threat]]
107framework = "MITRE ATT&CK"
108[[rule.threat.technique]]
109id = "T1059"
110name = "Command and Scripting Interpreter"
111reference = "https://attack.mitre.org/techniques/T1059/"
112[[rule.threat.technique.subtechnique]]
113id = "T1059.007"
114name = "JavaScript"
115reference = "https://attack.mitre.org/techniques/T1059/007/"
116
117
118
119[rule.threat.tactic]
120id = "TA0002"
121name = "Execution"
122reference = "https://attack.mitre.org/tactics/TA0002/"

Triage and analysis

Investigating React2Shell (CVE-2025-55182) Exploitation Attempt

This rule detects exploitation attempts targeting CVE-2025-55182, a critical remote code execution vulnerability in React's Flight protocol used by Next.js and other RSC implementations. The vulnerability stems from insecure prototype chain traversal in the Flight deserializer, allowing attackers to access __proto__, constructor, and ultimately the Function constructor to execute arbitrary code.

Possible investigation steps

  • Examine the full HTTP request body to identify the specific attack payload and command being executed.
  • Check the response body for E{"digest":"..."} patterns which contain command output from successful exploitation.
  • Identify the target application and verify if it runs vulnerable React (< 19.1.0) or Next.js (< 15.3.2) versions.
  • Review the source IP for other reconnaissance or exploitation attempts against web applications.
  • Check for the Next-Action header which is required for the exploit to work.
  • Correlate with process execution logs to identify if child processes (e.g., shell commands) were spawned by the Node.js process.

False positive analysis

  • Legitimate React Server Components traffic will NOT contain __proto__, constructor:constructor, or code execution patterns.
  • Security scanning tools like react2shell-scanner may trigger this rule during authorized penetration testing.
  • The combination of prototype pollution patterns with RSC-specific syntax is highly indicative of malicious activity.

Response and remediation

  • Immediately update affected applications: React >= 19.1.0, Next.js >= 15.3.2.
  • Block the source IP at the WAF/reverse proxy if exploitation is confirmed.
  • If HTTP 500 or 303 responses with digest output were observed, assume successful code execution and investigate for compromise.
  • Review server logs for evidence of command execution (file creation, network connections, process spawning).
  • Implement WAF rules to block requests containing __proto__ or constructor:constructor in POST bodies.

References

Related rules

to-top