Описание
Budibase: Row Action Trigger Bypasses View Row Filter Security Boundary Allowing Action on Out-of-Scope Rows
Summary
The row action trigger endpoint (POST /api/tables/:sourceId/actions/:actionId/trigger) fails to validate that the user-supplied rowId is within the scope of the view's row filters. A user with access to a filtered view can trigger row actions on any row in the underlying table, including rows explicitly excluded by the view's security filters.
Details
View filters in Budibase are treated as a security boundary. The search path (packages/server/src/sdk/workspace/rows/search.ts:93-94) explicitly enforces view query filters with the comment: "that could let users find rows they should not be allowed to access."
However, the row action trigger path bypasses this enforcement entirely:
-
Route (
packages/server/src/api/routes/rowAction.ts:55-59): Accepts asourceIdthat can be a viewId. -
Middleware (
packages/server/src/middleware/triggerRowActionAuthorised.ts:24-55): Correctly validates that the user has READ permission on the view and that the row action is enabled for that view. However, at line 55 it setsctx.params.tableId = tableIdwheretableIdis the underlying table extracted from the viewId — the viewId is discarded.
- Controller (
packages/server/src/api/controllers/rowAction/run.ts:11): Reads onlytableIdfrom params — the view context is gone.
- SDK (
packages/server/src/sdk/workspace/rowActions/crud.ts:254): Fetches the row usingsdk.rows.find(tableId, rowId)— directly from the table with no view filter enforcement.
The sdk.rows.find function (packages/server/src/sdk/workspace/rows/internal.ts:67-88) fetches the row by ID directly from the database, only validating that row.tableId === tableId. It never checks whether the row matches the view's query filters.
PoC
Impact
A user with BASIC role access to a filtered view can execute row actions (automations) on any row in the underlying table, including rows hidden by the view's security filters. The impact depends on what the triggered automation does:
- Information disclosure: The automation receives the full row data as input, which may contain fields/values the user should not see.
- Unauthorized data modification: If the automation modifies rows, the attacker can cause changes to rows outside their authorized scope.
- Unauthorized actions: If the automation sends notifications, calls webhooks, or performs other side effects, the attacker can trigger these for out-of-scope rows.
This breaks the security model established by view filters, which are explicitly documented as preventing users from accessing rows they should not see.
Recommended Fix
The middleware should pass the viewId to the controller, and the SDK run function should validate the row against the view's filters before executing the automation.
In packages/server/src/middleware/triggerRowActionAuthorised.ts, preserve the sourceId:
In packages/server/src/api/controllers/rowAction/run.ts, pass the sourceId:
In packages/server/src/sdk/workspace/rowActions/crud.ts, validate the row against view filters:
Пакеты
budibase
< 3.38.1
3.38.1
Связанные уязвимости
Budibase is an open-source low-code platform. Prior to 3.38.1, the row action trigger endpoint (POST /api/tables/:sourceId/actions/:actionId/trigger) fails to validate that the user-supplied rowId is within the scope of the view's row filters. A user with access to a filtered view can trigger row actions on any row in the underlying table, including rows explicitly excluded by the view's security filters. This vulnerability is fixed in 3.38.1.