<?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>Interfaces — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/interfaces/</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/interfaces/feed.xml" rel="self" type="application/rss+xml"/><item><title>Appsmith SQL Injection Vulnerability in FilterDataService</title><link>https://feed.craftedsignal.io/briefs/2024-01-appsmith-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-appsmith-sql-injection/</guid><description>A SQL injection vulnerability exists in Appsmith's FilterDataServiceCE.java in versions 1.98 and earlier where the dropTable method constructs a SQL DROP TABLE statement using string concatenation with the table name, allowing arbitrary SQL command execution, leading to potential data loss, exfiltration, or modification.</description><content:encoded><![CDATA[<p>A SQL injection vulnerability has been identified in Appsmith&rsquo;s <code>FilterDataServiceCE.java</code>, specifically within the <code>dropTable</code> method. This flaw affects Appsmith server instances running versions 1.98 and earlier of the <code>interfaces</code> package. The vulnerability stems from the direct concatenation of user-supplied table names into a SQL <code>DROP TABLE</code> statement without proper sanitization or validation. If an attacker can control the <code>tableName</code> argument, they can inject arbitrary SQL commands, potentially leading to unauthorized data manipulation, exfiltration, or data loss. This is particularly concerning in scenarios where the <code>dropTable</code> function is exposed through an API or utility accessible to users.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker identifies an Appsmith instance running a vulnerable version (&lt;= 1.98) of the <code>interfaces</code> package.</li>
<li>The attacker discovers an endpoint or API that utilizes the <code>FilterDataServiceCE.java</code>&rsquo;s <code>dropTable</code> method.</li>
<li>The attacker crafts a malicious <code>tableName</code> input containing SQL injection payload. Example: <code>valid_table; DROP TABLE users; --</code>.</li>
<li>The malicious input is passed to the <code>dropTable</code> method within <code>FilterDataServiceCE.java</code>.</li>
<li>The <code>dropTable</code> method concatenates the unsanitized input into a SQL <code>DROP TABLE</code> statement.</li>
<li>The resulting SQL query, containing the injected commands, is executed against the database via the <code>executeDbQuery</code> method.</li>
<li>The injected SQL commands are executed, potentially dropping tables, modifying data, or exfiltrating sensitive information, depending on the attacker&rsquo;s payload and the database user&rsquo;s permissions.</li>
<li>The attacker achieves their objective, such as data loss through arbitrary table deletion.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this SQL injection vulnerability can have severe consequences. The primary impact is data loss, as attackers can arbitrarily drop tables within the database. Depending on the database user&rsquo;s privileges, attackers may also be able to exfiltrate sensitive data or modify existing data. The vulnerability affects Appsmith server instances. The number of affected instances is currently unknown. However, the potential impact includes unauthorized access to and manipulation of sensitive data, impacting the confidentiality, integrity, and availability of the Appsmith application and its underlying database.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade Appsmith <code>interfaces</code> package to a version greater than 1.98 to patch the SQL injection vulnerability in <code>FilterDataServiceCE.java</code>.</li>
<li>Implement input validation and sanitization on any endpoints or APIs that utilize the <code>dropTable</code> method to prevent SQL injection attacks.</li>
<li>Deploy the provided Sigma rule to detect attempts to exploit this SQL injection vulnerability by monitoring for suspicious table names in logs associated with database operations.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>sql-injection</category><category>data-loss</category><category>appsmith</category></item></channel></rss>