Summary
CloudPaste's unauthenticated /api/proxy/link endpoint can disclose WebDAV credentials in a Basic Authorization header when an attacker knows a public share slug. Those credentials may let the attacker read, modify, or delete files on the associated WebDAV server.
Affected context
The issue affects CloudPaste versions 1.1.0 through 1.9.1 when the /api/proxy/link endpoint can be accessed without authentication and returns WebDAV authorization data associated with a public share. The risk depends on whether an attacker can obtain a valid public share slug and whether the disclosed credentials grant access to storage.
Exploit preconditions
- Attack surface: The unauthenticated
/api/proxy/linkAPI endpoint - Required access: No account authentication is required; the attacker needs to know a public share slug
- Trigger point: A request to the endpoint associated with that slug
- Why exploitation is possible: The response exposes a Basic Authorization header containing WebDAV credentials
Why this happens
The endpoint discloses sensitive authentication material to callers who have not been authorized to receive it. This is an instance of CWE-522: Insufficiently Protected Credentials: credentials are exposed through an API response rather than kept within a protected server-side trust boundary.
Potential impact
- An attacker may use the disclosed credentials to access WebDAV storage
- Files on the WebDAV server could be read, modified, or deleted
- Data confidentiality and integrity could be affected
- Exposed credentials could be reused against other services if they were shared
General mitigation guidance
Defensive approaches focus on preventing credentials from reaching unauthenticated responses and limiting the consequences of exposure. Common patterns include:
- Keeping storage credentials server-side and excluding them from API responses
- Requiring appropriate authorization before providing access to protected resources
- Returning narrowly scoped, short-lived access tokens instead of reusable storage credentials
- Restricting WebDAV credentials to the minimum permissions and resources required
- Rotating credentials if disclosure is suspected and avoiding credential reuse
How teams detect issues like this
Teams can look for this class of issue through:
- Static analysis and code review checks for secrets or authorization headers included in API responses
- Review of unauthenticated routes that handle storage credentials or public share identifiers
- API tests and response-schema policies that flag sensitive fields in externally accessible responses
- Monitoring for unexpected WebDAV access or changes following requests to public-share endpoints

