Summary
Zipline has an authorization flaw in the user-folder PATCH and DELETE handlers: an authenticated user may be able to act on another user's folder by supplying its ID. Depending on the action, this could allow the attacker to rename the folder, change its visibility or upload settings, or delete it.
Affected context
The issue affects Zipline's /api/user/folders/:id PATCH and DELETE handlers when they do not verify that the authenticated user owns, or is otherwise authorized to manage, the referenced folder. It is relevant when an authenticated user can reach these endpoints and provide an ID for a folder belonging to someone else.
Exploit preconditions
- Attack surface: The user-folder PATCH and DELETE API endpoints
- Required access: An authenticated account able to make requests to the endpoints
- Trigger point: A request referencing a folder ID that belongs to another user
- Why exploitation is possible: The handlers do not consistently check ownership or authorization for the specific folder before applying the requested action
Why this happens
The handlers use a client-supplied object identifier without enforcing an object-level authorization check. This is an insecure direct object reference: access to the endpoint is treated as sufficient permission to modify or delete the referenced folder, rather than verifying that the requester is authorized for that particular object. This maps to CWE-639: Authorization Bypass Through User-Controlled Key.
Potential impact
- An attacker may rename another user's folder.
- An attacker could change a folder's visibility or enable uploads.
- An attacker could delete another user's folder.
- Unauthorized changes may affect the folder owner's access to or management of their content.
General mitigation guidance
Defensive designs typically enforce authorization for each requested object and action, rather than relying on authentication or the presence of an identifier alone.
Common patterns include:
- Scoping object lookups to the authenticated user's authorized resources.
- Checking ownership or explicit permissions before every state-changing operation.
- Keeping folders private and uploads disabled by default unless an authorized owner changes those settings.
- Limiting account privileges and applying consistent authorization middleware across related endpoints.
- Avoiding reliance on unguessable identifiers as a substitute for access control.
How teams detect issues like this
High-level review and monitoring approaches include:
- Reviewing PATCH and DELETE handlers for object lookups that use request-supplied IDs without an ownership or permission check.
- Adding tests that verify one authenticated user cannot modify or delete another user's folders.
- Using static analysis or code review checks to flag state-changing routes with missing object-level authorization.
- Enforcing API policies that require authorization decisions to be made for each target resource and operation.

