Detection: Linux Suspicious React or Next.js Child Process

Description

This analytic detects Linux processes such as sh, bash, and common Linux LOLBINs being spawned by React or Next.js application servers. In the context of CVE-2025-55182 / React2Shell / CVE-2025-66478 for Next.js, successful exploitation can lead to arbitrary JavaScript execution on the server, which in turn is commonly used to invoke Node's child_process APIs (for example child_process.execSync) to run OS-level commands. Public proof-of-concept payloads and observed in-the-wild exploit traffic show patterns where the vulnerable React Server Components handler triggers process.mainModule.require('child_process').execSync() to execute binaries such as ping, curl, or arbitrary shells on the underlying host. This detection focuses on suspicious child processes where a Next/React server process spawns an uncommon process. Such activity might be a strong indicator of exploitation of the aforementioned vulnerability.

 1
 2| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime
 3  from datamodel=Endpoint.Processes
 4  where
 5    Processes.parent_process_name = "node"
 6    Processes.parent_process IN (
 7      "*--experimental-https*",
 8      "*--experimental-next-config-strip-types*",
 9      "*/node_modules/next*",
10      "*next dev*",
11      "*next start*",
12      "*node_modules/.bin*",
13      "*react-scripts start*",
14      "*start-server.js*"
15    )
16    AND (
17      Processes.process_name IN (
18        "awk",
19        "gawk",
20        "ifconfig",
21        "lua",
22        "nc",
23        "ncat",
24        "netcat",
25        "openssl",
26        "perl",
27        "php",
28        "python",
29        "python2",
30        "python3",
31        "ruby",
32        "socat",
33        "telnet"
34      )
35      OR (
36        Processes.process_name IN ("curl", "wget")
37        Processes.process = "*
38|*"
39      )
40      OR (
41        Processes.process_name IN (
42          "bash",
43          "dash",
44          "sh"
45        )
46        NOT Processes.process = "*-c*"
47      )
48      OR (
49        Processes.process_name IN (
50          "bash",
51          "dash",
52          "ksh",
53          "sh",
54          "zsh"
55        )
56        Processes.process IN (
57          "*/dev/tcp/*",
58          "*/dev/udp/*",
59          "*0>&1*",
60          "*curl*",
61          "*exec *>&*",
62          "*fsockopen*",
63          "*ifconfig*",
64          "*mkfifo*",
65          "*nc *",
66          "*ncat*",
67          "*netcat*",
68          "*proc_open*",
69          "*s_client*",
70          "*socat*",
71          "*socket*",
72          "*subprocess*",
73          "*TCPSocket*",
74          "*wget*"
75        )
76      )
77    )
78
79by Processes.action Processes.dest Processes.original_file_name Processes.parent_process
80   Processes.parent_process_exec Processes.parent_process_guid Processes.parent_process_id
81   Processes.parent_process_name Processes.parent_process_path Processes.process
82   Processes.process_exec Processes.process_guid Processes.process_hash Processes.process_id
83   Processes.process_integrity_level Processes.process_name Processes.process_path
84   Processes.user Processes.user_id Processes.vendor_product
85
86
87| `drop_dm_object_name(Processes)`
88
89| `security_content_ctime(firstTime)`
90
91| `security_content_ctime(lastTime)`
92
93| `linux_suspicious_react_or_next_js_child_process_filter`

Data Source

Name Platform Sourcetype Source
Sysmon for Linux EventID 1 Linux icon Linux 'sysmon:linux' 'Syslog:Linux-Sysmon/Operational'

Macros Used

Name Value
security_content_ctime convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$)
linux_suspicious_react_or_next_js_child_process_filter search *
linux_suspicious_react_or_next_js_child_process_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Notable Yes
Rule Title %name%
Rule Description %description%
Notable Event Fields user, dest
Creates Risk Event True
This configuration file applies to all detections of type TTP. These detections will use Risk Based Alerting and generate Notable Events.

Implementation

The detection is based on data that originates from Endpoint Detection and Response (EDR) agents. These agents are designed to provide security-related telemetry from the endpoints where the agent is installed. To implement this search, you must ingest logs that contain the process GUID, process name, and parent process. Additionally, you must ingest complete command-line executions. These logs must be processed using the appropriate Splunk Technology Add-ons that are specific to the EDR product. The logs must also be mapped to the Processes node of the Endpoint data model. Use the Splunk Common Information Model (CIM) to normalize the field names and speed up the data modeling process.

Known False Positives

Rare false positives might show up from child processes such as sh. Apply additional filters as needed.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message:

A Node-based server process ($parent_process_name$) on Linux spawned the child process $process_name$ with command-line $process$ on host $dest$ by user $user$, which may indicate remote code execution via React Server Components (CVE-2025-55182 / React2Shell) or abuse of a similar Node.js RCE vector.

Risk Object Risk Object Type Risk Score Threat Objects
dest system 70 parent_process_name, process, process_name
user user 70 parent_process_name, process, process_name

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset Syslog:Linux-Sysmon/Operational sysmon:linux
Integration ✅ Passing Dataset Syslog:Linux-Sysmon/Operational sysmon:linux

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub | Version: 1