<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Cosmos — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/cosmos/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 23 Apr 2026 14:12:02 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/cosmos/feed.xml" rel="self" type="application/rss+xml"/><item><title>OpenC3 COSMOS SQL Injection Vulnerability in QuestDB Time-Series Database</title><link>https://feed.craftedsignal.io/briefs/2024-01-09-openc3-sql-injection/</link><pubDate>Thu, 23 Apr 2026 14:12:02 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-09-openc3-sql-injection/</guid><description>A SQL injection vulnerability exists in the Time-Series Database (TSDB) component of COSMOS, allowing an authenticated remote user to execute arbitrary SQL commands, including telemetry data disclosure and deletion.</description><content:encoded><![CDATA[<p>A SQL injection vulnerability has been identified in the OpenC3 COSMOS Time-Series Database (TSDB) component, which utilizes QuestDB. The vulnerability resides within the <code>tsdb_lookup</code> function in the <code>cvt_model.rb</code> file, where user-supplied input is directly incorporated into SQL queries without proper sanitization. An authenticated attacker with &ldquo;tlm&rdquo; permissions, which includes Admin, Operator, Viewer, or Runner roles, can exploit this flaw to inject arbitrary SQL commands. This can lead to unauthorized data access, modification, or deletion within the TSDB. The affected versions are OpenC3 rubygems package versions &gt;= 6.7.0 and &lt; 7.0.0-rc3. Successful exploitation allows attackers to compromise the confidentiality, integrity, and availability of telemetry data stored within the COSMOS system.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker authenticates to the COSMOS system with a role that possesses &ldquo;tlm&rdquo; permissions (Admin, Operator, Viewer, or Runner).</li>
<li>The attacker crafts a malicious JSON-RPC request targeting the <code>get_tlm_values</code> endpoint.</li>
<li>Within the request body, the attacker injects a SQL payload into the <code>start_time</code> parameter, such as <code>' OR 1=1 --</code>.</li>
<li>The <code>tsdb_lookup</code> function incorporates the unsanitized input into a SQL query.</li>
<li>The injected SQL payload manipulates the query logic, allowing the attacker to bypass intended restrictions.</li>
<li>The attacker can then exfiltrate all telemetry data within the database by manipulating the SQL query.</li>
<li>The attacker modifies the SQL payload to execute arbitrary commands, such as <code>DROP TABLE</code> statements.</li>
<li>The attacker successfully deletes historical data from the database, impacting data availability and system integrity.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this SQL injection vulnerability allows an attacker to perform unauthorized actions on the OpenC3 COSMOS Time-Series Database (TSDB). An attacker with &ldquo;tlm&rdquo; permissions can disclose sensitive telemetry data, modify existing data, or delete data altogether. The vulnerability impacts systems running OpenC3 rubygems package versions &gt;= 6.7.0 and &lt; 7.0.0-rc3. Depending on the role of the compromised account and the specific SQL commands executed, an attacker could potentially cause significant disruption to operations relying on the integrity and availability of telemetry data.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>rubygems/openc3</code> package to version 7.0.0-rc3 or later to remediate the SQL injection vulnerability.</li>
<li>Implement input sanitization on user-supplied data within the <code>tsdb_lookup</code> function in <code>cvt_model.rb</code> to prevent SQL injection attacks.</li>
<li>Deploy the Sigma rule &ldquo;Detect Suspicious OpenC3 Telemetry Requests&rdquo; to identify potential exploitation attempts targeting the <code>get_tlm_values</code> endpoint.</li>
<li>Review and restrict &ldquo;tlm&rdquo; permissions to the <code>get_tlm_values</code> RPC endpoint according to the principle of least privilege, limiting access to only those users who require it.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>sql-injection</category><category>openc3</category><category>cosmos</category><category>questdb</category><category>telemetry</category></item><item><title>OpenC3 COSMOS Script Runner Permissions Bypass</title><link>https://feed.craftedsignal.io/briefs/2024-11-openc3-cosmos-bypass/</link><pubDate>Fri, 08 Nov 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-11-openc3-cosmos-bypass/</guid><description>The OpenC3 COSMOS Script Runner widget allows authenticated users to bypass API permissions checks and execute administrative actions by running specially crafted Python and Ruby scripts, leading to data manipulation and privilege escalation.</description><content:encoded><![CDATA[<p>The openc3-COSMOS-script-runner-api container includes a Script Runner widget that enables users to execute Python and Ruby scripts. A vulnerability exists where users with script execution privileges can bypass API permission checks due to shared networking among Docker containers. This bypass allows unauthorized administrative actions such as reading and modifying data within the Redis database, which can lead to the exposure of sensitive credentials and alteration of COSMOS settings. Attackers can also read and write to the buckets service, affecting configuration, logs, and plugins. The vulnerability affects versions prior to 7.0.0-rc3 of the rubygems/openc3 package, posing a significant risk to data integrity and system security. Any authenticated user with script execution capabilities can exploit this flaw to connect to any service within the Docker network, escalating their privileges and gaining control over critical system components.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker logs into the OpenC3 COSMOS platform with a valid, non-administrative user account that has access to the Script Runner widget.</li>
<li>The attacker crafts a Ruby script to extract Redis credentials (username, password, hostname, port) by querying the environment variables within the <code>openc3-COSMOS-script-runner-api</code> container using a command like <code>puts \</code>env | grep redis``.</li>
<li>The attacker executes the Ruby script within the Script Runner widget, successfully retrieving the Redis credentials, which are then displayed in the script&rsquo;s output.</li>
<li>The attacker crafts a Python script using the obtained Redis credentials to connect to the Redis database. The script is designed to create a new entry or modify an existing one. For example, <code>r.hset('openc3__settings_hacked','store_url',json.dumps(setting_data))</code></li>
<li>The attacker executes the Python script within the Script Runner widget, successfully adding or modifying data in the Redis database, bypassing normal permission controls.</li>
<li>The attacker leverages the ability to write to the buckets service to modify critical system configuration files, such as the plugin store URL, by uploading a malicious file via a Python or Ruby script.</li>
<li>The attacker verifies the changes by using <code>redis-cli</code> to confirm the new data was added to the Redis database, or by observing the altered behavior of the system due to the modified configuration files.</li>
<li>The attacker gains complete control over the OpenC3 COSMOS environment by exploiting modified settings, potentially leading to data exfiltration, service disruption, or further lateral movement within the network.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows unauthorized data disclosure and manipulation within the OpenC3 COSMOS environment. An attacker can access sensitive information such as Redis credentials, modify system settings, and alter configuration files, leading to privilege escalation. The number of affected installations is currently unknown, but the vulnerability poses a significant risk to organizations using OpenC3 COSMOS, potentially resulting in complete system compromise and loss of data integrity. The vulnerability allows unauthorized access to data and functionality typically restricted to administrators, bypassing intended security controls.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>rubygems/openc3</code> package to version 7.0.0-rc3 or later to remediate the vulnerability (reference: rubygems/openc3 v7.0.0-rc3).</li>
<li>Implement network segmentation to isolate the <code>openc3-COSMOS-script-runner-api</code> container from other critical services like Redis, limiting the blast radius of potential attacks.</li>
<li>Deploy the Sigma rule to detect the execution of suspicious scripts within the Script Runner widget that attempt to access Redis or modify configuration files.</li>
<li>Monitor process creation events within the <code>openc3-COSMOS-script-runner-api</code> container for commands such as <code>env | grep redis</code> or any calls to <code>redis-cli</code> which is abnormal behavior, and create alerts (reference: process_creation log source).</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>openc3</category><category>cosmos</category><category>script-runner</category><category>permissions-bypass</category><category>privilege-escalation</category></item></channel></rss>