Summary
OpenPanel before 2.3.0 does not properly validate chart formula expressions, allowing authenticated project members with read access to execute arbitrary JavaScript and operating-system commands through the API process.
The issue becomes risky when user-controlled formulas are evaluated with access to JavaScript constructors and Node.js capabilities, potentially bypassing organization authorization boundaries.
Affected context
The vulnerability occurs in OpenPanel chart formula processing when expressions supplied by project members are evaluated in an environment that exposes native JavaScript functionality. Deployments are particularly exposed when users with read-level project access can submit or influence formulas and the API process has broad operating-system or organization-level permissions.
Exploit preconditions
- Attack surface: OpenPanel chart formula evaluation
- Required access: An authenticated project membership with read access, subject to the application's authorization model
- Trigger point: Processing and evaluation of a crafted chart formula expression
- Why exploitation is possible: Insufficient expression validation permits access to the native JavaScript
Functionconstructor and capabilities exposed by the Node.js runtime
Why this happens
The underlying bug is inadequate validation and isolation of expressions treated as mathematical chart formulas. The evaluation environment permits access to native JavaScript constructor behavior, allowing a formula to escape its intended computation context and reach general-purpose code execution capabilities.
This maps to CWE-94: Improper Control of Generation of Code, because attacker-influenced input is interpreted as executable code rather than being restricted to a narrowly defined expression language.
Potential impact
- An attacker may execute arbitrary JavaScript within the API process.
- An attacker could execute operating-system commands with the API process privileges.
- Organization authorization boundaries may be bypassed.
- Confidential project or host data could be accessed or modified.
- The service could be used for lateral movement or further compromise.
General mitigation guidance
Mitigation generally focuses on removing general-purpose code execution from formula evaluation and reducing the trust placed in user-controlled expressions.
Common defensive patterns include:
- Evaluating formulas with a narrowly defined, allowlisted expression grammar rather than a general JavaScript runtime.
- Blocking access to constructors, module loading, runtime globals, and other non-mathematical capabilities.
- Applying strict server-side validation before evaluation and rejecting unsupported syntax by default.
- Running expression evaluation in a strongly isolated, least-privileged worker with restricted filesystem, network, and process permissions.
- Enforcing authorization independently of formula evaluation and limiting data access to the requesting organization and project.
- Treating all member-supplied formulas as untrusted input, including formulas submitted by users with read-level access.
How teams detect issues like this
High-level detection can combine:
- Static analysis for dynamic evaluation APIs, constructor recovery, unrestricted expression interpreters, and runtime module-loading paths.
- Code review checks for formula engines that expose JavaScript globals, object constructors, or Node.js built-ins.
- Tests that verify unsupported syntax, constructor access, and runtime capability access are rejected.
- Policy enforcement requiring allowlisted expression grammars and isolated execution for user-controlled formulas.
- Monitoring for anomalous chart formula submissions, unexpected child processes, module-loading activity, and API processes accessing unrelated organization data.
Automated security review tools may help identify dynamic code-generation patterns and dangerous runtime exposure during development.

