Summary
OneUptime's Synthetic Monitors feature allows users to run custom Playwright/JavaScript checks against websites, but prior to version 10.0.18 this untrusted code was executed inside Node.js's insecure vm module.
By abusing a prototype-chain escape (this.constructor.constructor), an attacker can break out of the sandbox, reach the Node.js process object, and execute arbitrary system commands on the oneuptime-probe container, potentially leading to full cluster compromise via exposed credentials.
Affected context
This vulnerability affects OneUptime deployments that:
- Enable Synthetic Monitors for projects
- Allow project members to author or modify custom Playwright/JavaScript checks
- Execute these checks within a Node.js environment using the
vmmodule or similarly weak sandboxing - Store sensitive credentials (e.g., database and cluster access tokens) in environment variables of the
oneuptime-probecontainer
In such setups, any user with permission to define synthetic monitor scripts effectively has a pathway to execute code on the probe container if sandbox boundaries are bypassed.
Exploit preconditions
- Attack surface: OneUptime web UI or API endpoints where Synthetic Monitor scripts are created, edited, or scheduled.
- Required access: Project membership or equivalent permission level that allows creating or modifying Playwright/JavaScript synthetic checks.
- Trigger point: Execution of the synthetic monitor job, which runs the attacker-controlled script in the Node.js
vmcontext inside theoneuptime-probecontainer. - Why exploitation is possible: The Node.js
vmmodule does not provide a robust security boundary. Standard JavaScript prototype-chain tricks such asthis.constructor.constructorcan reconstruct powerful constructors (likeFunction) and access the Node.jsprocessobject. Once this boundary is crossed, the script can invoke system-level APIs to execute arbitrary commands.
Why this happens
The core issue stems from treating a language-level sandbox (Node.js vm module) as a strong security boundary for untrusted code.
In abstract terms, this maps to CWE-94: Improper Control of Generation of Code ('Code Injection'). The application:
- Accepts untrusted JavaScript/Playwright code from users,
- Executes it dynamically with powerful runtime capabilities available via the prototype chain,
- Relies on the
vmmodule as a containment mechanism, even though it is not designed to withstand malicious sandbox escapes.
This design exposes an insecure pattern where user-supplied scripts, meant only for web testing, effectively become a vehicle for generating and running arbitrary Node.js code with the same privileges as the oneuptime-probe process. Because environment variables in that process hold sensitive credentials, the blast radius extends from a single container to the entire monitored cluster.
Potential impact
- Arbitrary OS command execution on the
oneuptime-probecontainer. - Theft of database credentials, API keys, and cluster access tokens from environment variables.
- Unauthorized access to OneUptime's backing databases, queues, or configuration stores.
- Lateral movement from the probe container to other services within the cluster.
- Data exfiltration, corruption, or deletion within monitored environments.
- Abuse of Synthetic Monitors as a persistent RCE foothold for further compromise.
General mitigation guidance
Effective mitigation focuses on eliminating unsafe execution of untrusted code and reducing the privileges of any remaining execution environment.
Safer design patterns include:
- Avoiding general-purpose code execution for user-defined checks; prefer declarative monitor definitions or a constrained DSL that cannot express arbitrary code.
- If scripted monitors are required, executing them in a separate, strongly isolated process or container with:
- No direct access to host system utilities beyond what is strictly needed.
- No sensitive environment variables or long-lived credentials.
- Network access restricted to approved target domains or services.
- Using security-hardened sandboxing solutions that are explicitly designed to contain malicious code, and treating them as defense-in-depth rather than the primary boundary.
- Applying the principle of least privilege to the
proberole: - Minimize the number and scope of credentials available to the execution environment.
- Use scoped tokens with tight permissions and short lifetimes instead of broad cluster-wide credentials.
- Implementing configuration options that allow administrators to:
- Disable custom scripted monitors entirely, or
- Restrict who can define them and where they can run.
- Separating concerns so that monitoring logic and credentialed cluster interaction are not executed within the same trust domain whenever possible.
How teams detect issues like this
To detect and manage this vulnerability class, organizations can rely on a combination of code-level and runtime strategies:
- Static analysis and code review:
- Flag any use of Node.js
vm,eval,Function, or similar dynamic evaluation constructs when handling user-supplied input. - Review paths where user-controlled scripts are passed into execution contexts, ensuring that they are either removed or strongly isolated.
- Establish secure coding guidelines that disallow treating
vmas a hard sandbox for untrusted code. - Policy and configuration checks:
- Enforce application-level policies that limit or prohibit arbitrary script execution features in multi-tenant environments.
- Regularly audit infrastructure-as-code and container definitions to confirm that sensitive credentials are not exposed to components running user-defined code.
- Runtime monitoring:
- Monitor synthetic monitor execution for suspicious patterns such as unusual system command usage, outbound network connections to unexpected destinations, or filesystem access that is unrelated to synthetic checks.
- Use centralized logging to capture and review script execution failures or anomalies that may indicate sandbox escape attempts.
Automated SAST and configuration scanning tools can assist in identifying high-risk usage of dynamic code execution APIs and insecure sandbox patterns during development and deployment.

