Summary
A command injection flaw in OneUptime's NetworkPathMonitor.performTraceroute() allows arbitrary operating system commands to be executed on the Probe server by abusing the monitor destination field.
Any authenticated project user who can configure or edit a network path monitor may inject shell metacharacters into the destination value, leading to full remote code execution on the monitoring Probe host.
Affected context
This vulnerability appears in OneUptime deployments that use the Network Path Monitor feature and rely on Probe servers to run traceroute-style diagnostics against configured destinations.
The issue arises when user-controlled monitor configuration data (the destination field) is passed to a shell command as part of NetworkPathMonitor.performTraceroute() without adequate sanitization or safe command construction.
Any project where normal users can create or edit monitors on a Probe is potentially affected, especially when Probes have elevated system or network privileges.
Exploit preconditions
- Attack surface: OneUptime web interface or API for creating/updating network path monitors.
- Required access: Authenticated access as a project user with permission to configure or modify monitor destinations.
- Trigger point: Invoking
NetworkPathMonitor.performTraceroute(), typically when the monitoring job runs or a user triggers traceroute via the UI/API. - Why exploitation is possible: The destination field is interpolated into a shell command that is executed by the Probe server, allowing shell metacharacters to alter command structure and inject arbitrary OS commands (CWE-78).
Why this happens
The root cause is unsafe construction of shell commands from user-controlled input in NetworkPathMonitor.performTraceroute().
Instead of treating the destination purely as data (e.g., passing it as an argument array to a system API), the implementation likely builds a command string and invokes it through a shell, trusting the destination value to be benign.
This pattern maps directly to CWE-78: Improper Neutralization of Special Elements used in an OS Command, where metacharacters such as ;, &&, |, or backticks in the destination field are interpreted by the shell as additional commands or control operators.
Potential impact
- Execution of arbitrary commands on the Probe server with the privileges of the Probe process.
- Full compromise of the Probe host, including access to local files, credentials, and configuration secrets.
- Use of the Probe as a pivot point for lateral movement inside the monitored network.
- Tampering with monitoring results, exfiltration of sensitive monitoring data, or disabling of critical checks.
- Potential deployment of malware or backdoors on infrastructure reachable from the Probe.
General mitigation guidance
Mitigation focuses on treating user-supplied values as untrusted data and eliminating shell interpretation paths.
Recommended patterns include:
- Avoid invoking shells: Prefer APIs that execute commands without going through a shell, passing arguments as arrays rather than string-concatenated commands.
- Strictly validate destinations: Accept only well-formed hostnames or IP addresses, using allowlists and rejecting any unexpected characters (spaces, metacharacters, control characters).
- Centralize command execution: Wrap OS command invocations in a hardened utility that enforces argument validation and escapes or rejects risky input.
- Apply least privilege: Run Probe processes under dedicated, minimally privileged accounts and restrict file system and network access to only what monitoring requires.
- Isolate Probes: Place Probe servers in hardened, segmented environments to limit blast radius if compromise occurs.
How teams detect issues like this
Organizations can look for command injection risks in similar code by:
- Static analysis: Configure rules to flag shell execution APIs (e.g.,
exec,system,popen, backticks, child process withshell: true) where arguments include user- or database-supplied data. - Code review: Pay special attention to monitoring, diagnostics, and admin features that wrap OS utilities (ping, traceroute, curl, dig, etc.) and ensure parameters are validated and not concatenated into command strings.
- Policy enforcement: Adopt secure coding standards that mandate no shell-based execution with untrusted input, and require argument-based APIs for all system calls.
- Runtime monitoring: Use host-based intrusion detection or EDR on Probe servers to detect unusual command patterns or processes spawned by monitoring services.

