Summary
Budibase's datasource management API allowed any authenticated non-builder app user with basic permissions to update datasource configuration objects via a PUT endpoint that was authorized as if it were read‑only.
By changing connection hosts, ports, or credentials on SQL/REST datasources, an attacker could redirect connections to internal network targets and abuse the platform as a blind SSRF-style proxy into internal services.
Affected context
This issue occurs in Budibase deployments where:
- The
/api/datasources/:datasourceIdPUT endpoint is exposed as part of the application API - Authorization for the update route is aligned with the read route (TABLE/READ), without distinguishing builder/admin users
- Non-builder app users with the BASIC built-in role or higher hold TABLE/WRITE permissions
- Datasources are configured to connect to SQL or REST backends reachable from the Budibase server's network environment
Under these conditions, any authenticated non-builder user can modify datasource configuration, including connection targets that may point to internal network resources.
Exploit preconditions
- Attack surface: Authenticated HTTP access to Budibase's REST API, specifically the
PUT /api/datasources/:datasourceIdendpoint. - Required access: Any valid Budibase app account with the BASIC built-in role (or higher), which implicitly carries TABLE/WRITE permissions.
- Trigger point: Submitting a crafted PUT request that updates a datasource's configuration object (e.g., host, port, credentials, REST base URL).
- Why exploitation is possible:
- The update route is registered with TABLE/READ-level authorization, equivalent to the read endpoint, and not restricted to builder/admin context.
- The controller responsible for updating datasources does not perform additional checks to ensure the caller is a builder or otherwise privileged.
- SQL driver connections lack network-level SSRF protections, so redirecting a datasource to internal IPs or arbitrary ports is honored by the server.
Why this happens
The core issue is missing authorization checks on a sensitive update operation.
The datasource update endpoint (PUT /api/datasources/:datasourceId) is authorized at the same level as a read-only endpoint and relies solely on coarse-grained TABLE/READ/TABLE/WRITE permissions granted to ordinary app users.
There is no additional role or capability check to ensure that only builder or administrative users can change datasource configuration, even though this configuration directly controls where the server issues outbound connections and which credentials it uses.
This maps to CWE-862: Missing Authorization: a critical operation (modifying a datasource's connection parameters) is exposed without enforcing appropriate authorization, allowing users with general data access to perform administrative-level configuration changes.
Potential impact
- Unauthorized modification of datasource connection details (host, port, database credentials, REST base URLs)
- Abuse of Budibase's server-side network position to perform SSRF-like probing of internal IP ranges and ports
- Interaction with internal services that are not meant to be exposed (e.g., internal databases, message queues, admin panels)
- Potential data exposure or manipulation in internal systems reachable via reconfigured datasources
- Lateral movement assistance by mapping internal network services and behavior via connection success/failure and response patterns
- Application instability or denial of service by pointing datasources to invalid or non-responsive endpoints
General mitigation guidance
Effective mitigation focuses on tightening authorization boundaries around configuration changes and reducing the platform's ability to act as a generic network proxy:
- Separate configuration permissions from data access:
- Treat datasource configuration management as an administrative function distinct from reading/writing table data.
- Require explicit builder/admin roles or dedicated capabilities for creating, updating, or deleting datasources.
- Apply least privilege to API routes:
- Use route-level authorization policies that differentiate read, write, and administrative actions, rather than tying them to generic data permissions.
- Ensure update/delete endpoints for infrastructure-facing objects (datasources, connectors, integrations) enforce stricter checks than read endpoints.
- Constrain network reach of outbound connections:
- Introduce network-level controls (firewalls, outbound allowlists, proxy rules) so that datasource connections cannot freely target arbitrary internal hosts and ports.
- Prefer configuration that restricts drivers to specific trusted hostnames or networks instead of arbitrary user-supplied endpoints.
- Harden sensitive configuration objects:
- Treat connection strings, credentials, and host definitions as high-value configuration separate from regular application data.
- Reduce the number of runtime components and identities that can modify these objects, and log all changes.
- Follow secure-by-default patterns:
- Default new installations to conservative authorization models where non-builder users cannot modify infrastructure-related configuration.
- Make any expanded configuration privileges explicit and opt-in.
How teams detect issues like this
Detection and analysis can combine code-level review, configuration auditing, and runtime monitoring:
- Static analysis & code review:
- Review API route registration to verify that update/delete endpoints have stricter authorization than read endpoints, especially for configuration objects.
- Identify controllers that accept configuration changes (datasources, connectors) and ensure they enforce builder/admin checks or equivalent privilege gating.
- Use static analysis or linters to flag endpoints that modify critical settings but are protected only by generic read/write permissions.
- Access control and policy checks:
- Implement automated checks (e.g., in CI/CD) to validate that sensitive operations (network configuration, credential management, integration setup) require elevated roles.
- Maintain a policy catalog describing which actions are builder/admin-only and verify that route definitions conform to that policy.
- Runtime monitoring and logging:
- Log all datasource configuration changes, including initiator identity, old/new values (or redacted diffs), and timestamps.
- Set up anomaly detection to alert on:
- Non-builder users invoking datasource update endpoints.
- Frequent or unusual changes to datasource hosts, ports, or base URLs.
- Monitor outbound database/HTTP connections for attempts to reach unexpected internal IP ranges or high-risk ports.
- Periodic permissions review:
- Regularly audit roles and permissions to ensure basic users do not hold capabilities intended for builders or administrators.

