{"id":"GHSA-h8cj-hpmg-636v","aliases":["GHSA-h8cj-hpmg-636v"],"related":[],"kind":"vulnerability","state":"published","title":"appsmith has SQL Injection in FilterDataService via Unsafe DROP TABLE Execution","summary":"### Summary\nA 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.\n\n### Details\nThe vulnerability is located in `app/server/appsmith-interfaces/src/main/java/com/appsmith/external/services/ce/FilterDataServiceCE.java`.\n\nLine 627 in `dropTable` method:\n```java\npublic void dropTable(String tableName) {\n    String dropTableQuery = \"DROP TABLE \" + tableName + \";\";\n    executeDbQuery(dropTableQuery);\n}\n```\n\nThe `tableName` argument is concatenated directly into the SQL string without validation or escaping.\n\n### PoC\nIf `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:\n`valid_table; DROP TABLE users; --`\n\nThe resulting query would be:\n`DROP TABLE valid_table; DROP TABLE users; --;`\n\nThis would delete the intended table and then delete the `users` table (or execute any other injected SQL).\n\n### Impact\n*   **Type:** SQL Injection\n*   **Impact:** Data Loss (Drop Table), potentially Data Exfiltration or Modification depending on database permissions.\n*   **Who is impacted:** Appsmith server instances.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"### Summary\nA 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.\n\n### Details\nThe vulnerability is located in `app/server/appsmith-interfaces/src/main/java/com/appsmith/external/services/ce/FilterDataServiceCE.java`.\n\nLine 627 in `dropTable` method:\n```java\npublic void dropTable(String tableName) {\n    String dropTableQuery = \"DROP TABLE \" + tableName + \";\";\n    executeDbQuery(dropTableQuery);\n}\n```\n\nThe `tableName` argument is concatenated directly into the SQL string without validation or escaping.\n\n### PoC\nIf `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:\n`valid_table; DROP TABLE users; --`\n\nThe resulting query would be:\n`DROP TABLE valid_table; DROP TABLE users; --;`\n\nThis would delete the intended table and then delete the `users` table (or execute any other injected SQL).\n\n### Impact\n*   **Type:** SQL Injection\n*   **Impact:** Data Loss (Drop Table), potentially Data Exfiltration or Modification depending on database permissions.\n*   **Who is impacted:** Appsmith server instances.","format":"markdown","source":"ghsa"}],"published":"2026-04-29T20:59:45.000Z","modified":"2026-05-05T16:07:07.369Z","severity":{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"}],"cwes":["CWE-89"],"affected":[{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.99"}],"ecosystem":"Maven","package":"com.appsmith:interfaces","purl":"pkg:maven/com.appsmith/interfaces","source":"ghsa"}],"references":[{"url":"https://github.com/appsmithorg/appsmith/security/advisories/GHSA-h8cj-hpmg-636v","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/appsmithorg/appsmith/commit/c8023ba4b3b54204ff3309c9e5c33664ad15ba32","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/appsmithorg/appsmith","tags":["package"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h8cj-hpmg-636v","url":"https://github.com/advisories/GHSA-h8cj-hpmg-636v","licence":"CC-BY-4.0","modified":"2026-05-05T16:07:07.369Z"}],"updatedAt":"2026-11-25T22:56:28.066Z"}