Summary
Budibase contains an authorization regression in its S3 attachment upload endpoint that allows BASIC users to obtain presigned S3 PutObject URLs. If the endpoint accepts an attacker-controlled bucket while relying on stored IAM credentials, unauthorized files may be uploaded to buckets those credentials can access.
Affected context
The issue occurs in Budibase deployments using the S3 attachment upload functionality. It is relevant when the endpoint authorizes requests with the TABLE/WRITE permission rather than the intended BUILDER permission and permits the requested bucket to influence presigned URL generation. The practical exposure depends on the permissions of the IAM credentials stored by the application.
Exploit preconditions
- Attack surface: The Budibase S3 attachment upload endpoint
- Required access: An authenticated account with BASIC-level access and the permissions accepted by the regressed route
- Trigger point: A POST request that causes the application to generate an S3 PutObject presigned URL
- Why exploitation is possible: The endpoint uses an insufficient authorization check and may accept an attacker-supplied bucket name when creating a URL with stored IAM credentials
Why this happens
The vulnerability results from an authorization regression in which a route's required permission changed from BUILDER to TABLE/WRITE. Because BASIC users may hold the latter permission by default, the endpoint can expose a privileged storage operation to a broader audience than intended. Allowing request data to influence the target bucket further expands the effect of the authorization failure. This behavior maps to CWE-863: Incorrect Authorization.
Potential impact
- Attackers may upload unauthorized files to S3 buckets accessible to the application's IAM credentials
- Stored objects could be overwritten or polluted where the granted permissions allow it
- Malicious files may be distributed through applications or workflows that trust the affected buckets
- Cloud storage costs, data integrity, or downstream systems could be affected
General mitigation guidance
Mitigation generally focuses on restoring least-privilege authorization and constraining storage targets.
Common defensive patterns include:
- Require the intended elevated permission for presigned upload URL generation
- Enforce server-side authorization independently of client-supplied role or request fields
- Restrict uploads to an allowlisted set of buckets, prefixes, and object operations
- Avoid allowing users to select arbitrary cloud resource identifiers
- Use narrowly scoped IAM credentials with limited bucket, prefix, and operation permissions
- Apply object validation, size limits, and content handling controls before accepting uploads
- Review authorization changes with regression tests covering every supported role
How teams detect issues like this
Organizations can investigate this issue through:
- Static and semantic analysis of route permission decorators, middleware, and policy checks
- Code review searches for authorization changes from elevated roles to ordinary write permissions
- Tests that exercise attachment endpoints with each role and verify denied operations
- Monitoring for presigned URL issuance by unexpected user classes
- Auditing requests for bucket names or prefixes outside approved storage targets
- Cloud-provider logs that identify unusual PutObject activity associated with application credentials
- Policy enforcement that rejects IAM permissions broader than the application's documented storage scope

