Summary
Documenso before 2.13.0 permits PDF uploads through the /api/files/upload-pdf endpoint without authentication, session tokens, or API credentials. An unauthenticated attacker may repeatedly upload arbitrary PDF files, exhausting storage capacity or creating unlinked document records that consume database resources.
Affected context
The vulnerability occurs in Documenso deployments that expose the PDF upload endpoint without an effective authentication or authorization check. It becomes risky when the endpoint is reachable by untrusted users and lacks meaningful controls on upload frequency, file quantity, storage consumption, or record creation.
Exploit preconditions
- Attack surface: The
/api/files/upload-pdfHTTP endpoint - Required access: Network access to the endpoint; no valid account, session token, or API credential is required
- Trigger point: Submission of PDF upload requests
- Why exploitation is possible: The endpoint accepts uploads before verifying the caller's identity and does not adequately restrict repeated resource-consuming requests
Why this happens
The underlying bug is an authorization boundary failure: a resource-creating endpoint is available without authentication. This maps to CWE-306: Missing Authentication for Critical Function, because the application performs file and database operations without first establishing the identity of the requester. Without that trust decision, anonymous callers can consume resources intended for authenticated workflows.
Potential impact
- Attackers may exhaust available file-storage capacity
- The application may experience degraded availability as storage or database resources are consumed
- Unlinked document records could increase database size and maintenance overhead
- Administrators may face increased cleanup, monitoring, and recovery costs
General mitigation guidance
Mitigation generally focuses on enforcing authentication and authorization before any resource-creating upload operation.
Common defensive patterns include:
- Requiring a validated user session, service credential, or equivalent identity before accepting uploads
- Applying authorization checks that restrict uploads to permitted accounts or workflows
- Enforcing file-count, size, storage-quota, and request-rate limits
- Using bounded, monitored temporary storage and performing cleanup of abandoned records
- Separating uploaded content from sensitive application resources
- Running upload processing with least privilege and applying resource-isolation controls
- Returning consistent responses that do not disclose unnecessary implementation details
How teams detect issues like this
Organizations can detect this class of issue through:
- Static and dynamic tests verifying that upload endpoints reject unauthenticated requests
- Code review checks for file-writing or database-creating routes without authentication middleware
- API inventory reviews that identify publicly reachable resource-intensive operations
- Monitoring for unusual anonymous upload volume, repeated requests, storage growth, and orphaned records
- Policy enforcement requiring authentication, authorization, rate limiting, and quota controls for upload APIs
Automated security testing and code review tools may help identify endpoints whose protection differs from adjacent authenticated routes.

