Summary
TypeBot's deprecated upload endpoint may issue presigned S3 upload URLs for attacker-selected object paths without verifying access to those paths. An unauthenticated attacker who knows a valid public typebot and file-input block could write objects in private or other tenants' shared-bucket locations.
Affected context
The issue occurs in TypeBot deployments using versions before 3.17.0 where the deprecated upload URL endpoint remains available. The endpoint validates that a referenced typebot is public and that a referenced block is a file input, but may not authorize the attacker-controlled filePath against the requesting tenant or permitted storage prefix.
Exploit preconditions
- Attack surface: Public HTTP API endpoint that generates presigned S3 PUT URLs
- Required access: No authenticated account is required, but a valid public typebot ID and file-input block ID must be known
- Trigger point: A request to the upload URL endpoint containing an attacker-selected filePath
- Why exploitation is possible: Authorization is applied to the referenced public resources but not to the requested storage object key or tenant boundary
Why this happens
The underlying bug is an authorization failure caused by validating resource visibility without validating authorization for the requested storage destination. The service treats a user-controlled object key as acceptable after checking only that the typebot and block are public, allowing the presigned URL capability to cross intended tenant or path boundaries. This behavior maps to CWE-862, Missing Authorization.
Potential impact
- An attacker may overwrite or create objects in protected storage prefixes
- Other tenants' public objects could be modified or replaced
- Private application data could be damaged or exposed through downstream use
- Malicious uploaded content could affect chatbot behavior or application workflows
- Storage integrity and tenant isolation could be compromised
General mitigation guidance
Mitigation generally focuses on enforcing authorization at the storage-key
boundary rather than relying only on resource visibility checks.
Common defensive patterns include:
- Deriving storage keys server-side from the authenticated tenant, resource, and block context
- Rejecting client-supplied keys or restricting them to an explicitly authorized prefix
- Checking tenant ownership and object-level permissions before generating presigned URLs
- Limiting presigned URLs to the intended operation, object, content type, and lifetime
- Applying least-privilege permissions to storage credentials and separating tenant storage namespaces
- Removing or isolating deprecated endpoints when they are no longer required
How teams detect issues like this
Organizations can identify similar issues through:
- Static analysis and code review checks for presigned URL generation using request-controlled object keys
- Review of authorization logic around tenant identifiers, resource visibility, and storage prefixes
- API tests that attempt cross-tenant, private-prefix, and sibling-object access
- Monitoring for unusual presigned URL issuance or writes outside expected tenant prefixes
- Policy enforcement requiring server-derived object names and explicit object-level authorization
- Automated security review tools that flag missing authorization checks on storage operations

