Cross-tenant datasource execution via missing authorization in action validation
Description
An authenticated Appsmith user could cause an action in a public application to use a datasource belonging to another workspace because datasource authorization was not enforced during action validation. This affects Community, Enterprise, and Cloud deployments where users can create and publish applications. No special server configuration is required.
Impact
A successful attack could make a victim workspace's datasource executable through the attacker's public application. Queries would run with the datasource's stored credentials, potentially exposing or modifying data available to that datasource. The attacker does not need membership in the victim workspace, and visitors invoking the public application do not need to be authenticated.
Affected and patched versions
Appsmith versions up to and including 2.2 are affected. Upgrade to 2.3 or later.
Workarounds
No complete workaround is available. Until upgrading, restrict instance access to trusted users and disable or limit public application access where possible. Apply least-privilege permissions to datasource credentials.
After upgrading
Review public applications and datasource access policies for unexpected access. If unauthorized execution may have occurred, audit the affected systems and rotate the relevant datasource credentials.
Credits
Thanks to @komyunghan, Matteo Panzeri (@matte1782), and nasaa_0x (@nasaa0x) for reporting this issue.