Summary
CVE-2026-72573 is a high-severity OS command injection vulnerability in pm2panel, where an authenticated remote user can influence a command executed by the server.
Because the request parameter is passed to a shell without validation or escaping, an attacker may execute arbitrary system commands on the host.
Affected context
The vulnerability occurs in the pm2panel request-handling path that processes the query-string id parameter for PM2 restart operations. It affects deployments where an authenticated remote user can reach this handler and the application constructs a shell command from that parameter without enforcing a strict value format or using shell-safe process execution.
Exploit preconditions
- Attack surface: The remotely accessible pm2panel HTTP handler that accepts the
idquery parameter - Required access: Valid authentication or another ability to reach the authenticated handler
- Trigger point: Processing a PM2 restart request
- Why exploitation is possible: User-controlled input is concatenated into a shell command and executed without adequate validation or shell escaping
Why this happens
The underlying flaw is direct interpolation of untrusted request data into a command executed through a system shell. Shell metacharacters and command separators can alter the intended command structure when input is not constrained to an approved format.
This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly called OS command injection. The insecure pattern is treating externally supplied data as part of executable command syntax rather than as a strictly validated argument.
Potential impact
- An attacker may execute arbitrary operating-system commands with the application's privileges
- The host may be compromised or used for persistence
- Application data, credentials, and configuration files could be exposed
- The service may be disrupted or PM2-managed processes altered
- The compromised host could be used for lateral movement
General mitigation guidance
Mitigation generally focuses on removing shell interpretation from process-control operations and reducing trust in request parameters.
Common defensive patterns include:
- Use direct process-execution APIs that pass arguments separately instead of invoking a shell
- Restrict identifiers to an allowlisted format and validate them against authorized PM2 processes
- Reject unexpected characters, encodings, types, and length values before command construction
- Apply authorization checks so users can restart only permitted processes
- Run the service with the minimum operating-system privileges and filesystem access required
- Avoid exposing administrative process-control endpoints beyond necessary trust boundaries
How teams detect issues like this
Organizations can look for this vulnerability through:
- Static analysis rules identifying string concatenation or interpolation passed to shell execution APIs
- Code review checks for request parameters used in process, command, or shell execution
- Runtime monitoring of unusual child processes launched by the pm2panel service
- Web application logs showing abnormal process-control requests or unexpected parameter formats
- Policy enforcement that requires argument-separated process APIs and approved input-validation patterns
Automated security review tools may help identify command execution calls that consume HTTP request data.

