Summary
Chatwoot's direct uploads controller lacks proper authentication checks, allowing unauthenticated users to create arbitrary ActiveStorage blobs in tenant accounts.
By resolving arbitrary accounts and conversations and obtaining signed PUT URLs, attackers can upload arbitrary data into the application's storage backend.
Affected context
This vulnerability exists in Chatwoot deployments that expose the direct uploads controller and rely on it to issue signed PUT URLs for ActiveStorage.
It is most relevant in multi-tenant environments where separate accounts and conversations are mapped to shared infrastructure, and where storage backends (e.g., S3-like services) accept uploads based solely on signed URLs produced by the application.
The issue assumes the application does not enforce an authentication or authorization layer before resolving a tenant account and conversation in the direct upload flow.
Exploit preconditions
- Attack surface: Public HTTP endpoints associated with the direct uploads controller.
- Required access: No authentication or valid user session is required; attackers can be fully unauthenticated.
- Trigger point: Calling the direct upload endpoint to resolve an arbitrary account and conversation, then requesting a signed PUT URL for ActiveStorage.
- Why exploitation is possible: The controller omits mandatory authentication checks (CWE-306), allowing any caller to act as if they were an authenticated tenant user when requesting signed upload URLs.
Why this happens
The root cause is a missing authentication enforcement on a security-sensitive endpoint that issues signed upload URLs.
Instead of restricting access to authenticated users scoped to a specific tenant, the direct uploads controller allows unauthenticated requests to resolve tenant accounts and conversations and to generate ActiveStorage blobs.
This maps to CWE-306: Missing Authentication for Critical Function, where a function that significantly affects application state and data integrity (issuing upload tokens) is exposed without verifying the caller's identity.
Potential impact
- Attackers may upload arbitrary files or data into a tenant's storage namespace.
- Attackers could plant misleading or malicious attachments in conversations, impacting user trust and application integrity.
- Storage costs can increase due to uncontrolled uploads, leading to resource exhaustion risks.
- Uploaded content could be used as a stepping stone for social engineering or to distribute harmful content through legitimate-looking channels.
General mitigation guidance
Mitigation generally focuses on enforcing strong identity and tenant scoping around direct upload flows.
Recommended defensive patterns include:
- Requiring explicit authentication on endpoints that issue signed upload URLs, ensuring only logged-in users can request uploads.
- Applying strict authorization checks to ensure requested uploads are tied to the authenticated user's tenant and conversation.
- Implementing server-side validation of metadata (account IDs, conversation IDs, content types, size limits) before issuing storage tokens.
- Designing upload workflows so clients never directly control tenant identifiers; instead, use server-derived context from the authenticated session.
- Applying least privilege to storage tokens so that each signed URL only permits a single, constrained upload operation.
How teams detect issues like this
Detection efforts can focus on both code and runtime behavior:
- Static analysis and code review can flag controllers or routes that issue signed URLs or interact with storage backends without explicit authentication or authorization filters.
- Reviewing routing and controller filters (e.g., before_action hooks) to ensure all file-upload-related actions are covered by authentication.
- Monitoring logs for patterns where direct upload endpoints are called from unauthenticated sessions or from unusual IP ranges.
- Implementing policy checks in CI/CD that prevent merging changes that add new public endpoints for blob creation without accompanying access control annotations.

