<?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>Ckan — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/ckan/</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>Wed, 03 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/ckan/feed.xml" rel="self" type="application/rss+xml"/><item><title>CKAN Unauthenticated SQL Injection in datastore_search_sql</title><link>https://feed.craftedsignal.io/briefs/2024-01-ckan-sql-injection/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-ckan-sql-injection/</guid><description>An unauthenticated SQL injection vulnerability in CKAN's `datastore_search_sql` function allows attackers to access private resources and PostgreSQL system information, affecting versions prior to 2.10.10 and versions 2.11.0 through 2.11.4.</description><content:encoded><![CDATA[<p>A critical SQL injection vulnerability exists within the <code>datastore_search_sql</code> function of CKAN, an open-source data management system. This vulnerability allows unauthenticated attackers to inject arbitrary SQL queries, potentially leading to unauthorized access to sensitive data, including private resources and PostgreSQL system information. The vulnerability affects CKAN versions prior to 2.10.10 and versions 2.11.0 up to and including 2.11.4.  Successful exploitation can compromise the confidentiality and integrity of the CKAN instance and its underlying database. The issue was reported by Arvin Shivram of Brutecat Security and patched in CKAN versions 2.10.10 and 2.11.5.  Organizations using vulnerable versions of CKAN are at risk of data breaches and unauthorized access to critical system information.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker identifies a CKAN instance running a vulnerable version (prior to 2.10.10 or 2.11.0-2.11.4).</li>
<li>The attacker crafts a malicious HTTP request targeting the <code>datastore_search_sql</code> endpoint.</li>
<li>The malicious request contains a SQL injection payload within the parameters expected by <code>datastore_search_sql</code>.</li>
<li>CKAN&rsquo;s <code>datastore_search_sql</code> function fails to properly sanitize the input, allowing the injected SQL code to be executed against the PostgreSQL database.</li>
<li>The injected SQL query retrieves sensitive data, such as private resource information, user credentials, or PostgreSQL system details.</li>
<li>The attacker extracts the compromised data from the HTTP response.</li>
<li>The attacker may use the compromised credentials to gain further access to the CKAN instance and its associated systems.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this SQL injection vulnerability can lead to unauthorized access to sensitive data stored within the CKAN DataStore, including private resources and user credentials. Attackers can also gain access to PostgreSQL system information, potentially leading to further system compromise. The number of affected organizations is unknown, but any organization running a vulnerable version of CKAN is at risk. If successful, the attack can lead to data breaches, financial losses, and reputational damage.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade CKAN instances to version 2.10.10 or 2.11.5 to remediate CVE-2026-42031.</li>
<li>As a temporary workaround, disable the DataStore SQL search by setting <code>ckan.datastore.sqlsearch.enabled = false</code> in the CKAN configuration, as mentioned in the overview.</li>
<li>Monitor web server logs for suspicious requests targeting the <code>datastore_search_sql</code> endpoint, looking for SQL syntax within the query parameters using the Sigma rules provided below.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>ckan</category><category>sql-injection</category><category>vulnerability</category></item></channel></rss>