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

- Severity: High 7.2 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-04-29T20:59:45.000Z
- Modified: 2026-05-05T16:07:07.369Z
- Weaknesses: CWE-89

## 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.

(As written by GitHub Advisory Database.)

## Affected

- com.appsmith:interfaces (Maven): before 1.99

## References

- <https://github.com/appsmithorg/appsmith/security/advisories/GHSA-h8cj-hpmg-636v> (web)
- <https://github.com/appsmithorg/appsmith/commit/c8023ba4b3b54204ff3309c9e5c33664ad15ba32> (web)
- <https://github.com/appsmithorg/appsmith> (package)

## Sources

- GitHub Advisory Database: [GHSA-h8cj-hpmg-636v](https://github.com/advisories/GHSA-h8cj-hpmg-636v), CC-BY-4.0, modified 2026-05-05

---

Page: https://cve.day/GHSA-h8cj-hpmg-636v · Whole record: https://cve.day/GHSA-h8cj-hpmg-636v.json · Rebuilt by cve.day 2026-11-25T22:56:28.066Z
