# GHSA-h8cj-hpmg-636v: appsmith has SQL Injection in FilterDataService via Unsafe DROP TABLE Execution

> SQL injection in Appsmith's FilterDataService allows attackers to execute arbitrary SQL commands, potentially leading to data loss or exfiltration.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 29 Apr 2026

## What is GHSA-h8cj-hpmg-636v?

GHSA-h8cj-hpmg-636v is a SQL injection vulnerability in com.appsmith:interfaces, published on 29 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

### Summary
A SQL injection vulnerability exists in `FilterDataServiceCE.java` where the `dropTable` method constructs a SQL `DROP TABLE` statement using string concatenation with the table name. If the table name is derived from user input, this allows for arbitrary SQL command execution.

### Details
The vulnerability is located in `app/server/appsmith-interfaces/src/main/java/com/appsmith/external/services/ce/FilterDataServiceCE.java`.

Line 627 in `dropTable` method:
```java
public void dropTable(String tableName) {
    String dropTableQuery = "DROP TABLE " + tableName + ";";
    executeDbQuery(dropTableQuery);
}
```

The `tableName` argument is concatenated directly into the SQL string without validation or escaping.

### PoC
If `dropTable` is exposed to user input (e.g., via a utility API that accepts a table name to clean up), an attacker could provide a value like:
`valid_table; DROP TABLE users; --`

The resulting query would be:
`DROP TABLE valid_table; DROP TABLE users; --;`

This would delete the intended table and then delete the `users` table (or execute any other injected SQL).

### Impact
*   **Type:** SQL Injection
*   **Impact:** Data Loss (Drop Table), potentially Data Exfiltration or Modification depending on database permissions.
*   **Who is impacted:** Appsmith server instances.

## Which versions are affected by GHSA-h8cj-hpmg-636v?

2 open source packages ship an affected version, including com.appsmith:interfaces.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.appsmith:interfaces` | Maven | All versions | 1.99 |
| `com.appsmith:interfaces` | Maven | All versions | 1.99 |

## How do I fix GHSA-h8cj-hpmg-636v?

Upgrade com.appsmith:interfaces to 1.99 or later.

## Is GHSA-h8cj-hpmg-636v being exploited?

There is no known exploitation of GHSA-h8cj-hpmg-636v in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-h8cj-hpmg-636v and fix it if it is affected.

What it is: GHSA-h8cj-hpmg-636v is a SQL injection vulnerability in com.appsmith:interfaces, published on 29 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-h8cj-hpmg-636v in the wild and no public exploit code.

Affected packages and fixed versions:
- com.appsmith:interfaces (Maven): affected all versions; fixed in 1.99
- com.appsmith:interfaces (Maven): affected all versions; fixed in 1.99

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-h8cj-hpmg-636v/ (Markdown: https://insights.sbomify.com/GHSA-h8cj-hpmg-636v/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-h8cj-hpmg-636v

---
From sbomify Insights: https://insights.sbomify.com/GHSA-h8cj-hpmg-636v/
Summaries are generated and may contain mistakes; the official description above is the record.
