/

CVE-2026-27728

Severity:

CRITICAL RISK

(9.9)

OS Command Injection in OneUptime NetworkPathMonitor

CVE-2026-27728

Analyzed

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution on Probe Server

Severity:

CRITICAL RISK

(9.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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 with shell: 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.

Sources

SourceLink
github.comgithub.com/OneUptime/oneuptime/commit/f2cce35a04fac756cecc7a4c55e23758b99288c1
github.comgithub.com/OneUptime/oneuptime/security/advisories/GHSA-jmhp-5558-qxh5

Frequently asked

questions

Yes, but only via authenticated access. An attacker who can log in as a project user and modify monitor destinations can trigger command execution on the Probe server remotely through the OneUptime interface or API.

Not necessarily. Any project-level account with the ability to create or edit network path monitors is sufficient. Higher privileges may increase what else they can do, but the command execution itself does not inherently require admin-level roles.

The most robust fix is to remove shell dependence entirely: call traceroute (or equivalent tools) via APIs that accept argument arrays, validate that the destination is a hostname or IP in a strict format, and reject any input containing shell metacharacters or whitespace beyond what is absolutely required.

Establish a secure coding guideline that forbids building shell command strings from user input, mandates centralized helpers for OS command invocation, and requires input validation/normalization for all configuration fields that influence system commands, with automated checks in CI to flag violations.

Find out what's already
exploitable in your codebase.