Server-side file read and write via SQL injection in datasource filters
Description
An authenticated workspace member with Developer access can use SQL injection in datasource filters to read and write files accessible to the Appsmith server process. This affects self-hosted Appsmith Community and Enterprise installations using filtering in Amazon S3 or Google Sheets actions. No non-default server configuration is required.
Impact
An attacker who can edit and execute an affected datasource action can bypass the intended filter and access server-side files. Exposed files may contain instance configuration, encryption secrets, or credentials for connected services. Access to these secrets can affect other workspaces on the same installation. File writes are limited by the filesystem permissions of the Appsmith server process.
Affected and patched versions
Appsmith versions earlier than 2.4.1 are affected. Upgrade to 2.4.1 or later.
Workarounds
Until you upgrade, limit access to edit and execute affected datasource actions to trusted users. This reduces exposure but does not replace the upgrade.
After upgrading
If you suspect exploitation, investigate unauthorized access or changes to server files and rotate any credentials that may have been exposed. Upgrading does not revoke credentials exposed before the upgrade.
Credits
Thanks to @odgrso, 键盘手殴多克 (@oduoke567), Sajda Kabir (@sajdakabir) and @quxaa for reporting this issue.