Summary
Zipline's user data export endpoint is vulnerable to path traversal through the name query parameter. An authenticated attacker may bypass a user ID check and read files accessible to the server process by supplying directory traversal sequences.
Affected context
The issue affects Zipline versions from 3.4.5 before 3.7.10 in the user data export endpoint. It becomes risky when the endpoint handles the name query parameter without adequately constraining the resulting file path, allowing a request to escape the intended data directory.
Exploit preconditions
- Attack surface: The user data export endpoint
- Required access: An authenticated account able to access the endpoint
- Trigger point: Processing the
namequery parameter during an export request - Why exploitation is possible: Path validation and user ID checks can be bypassed, allowing traversal beyond the intended directory
Why this happens
The application does not sufficiently constrain a path derived from user-controlled input before using it to locate data for export. This is a path traversal weakness mapped to CWE-22: Improper Limitation of a Pathname to a Restricted Directory. The underlying insecure pattern is trusting a supplied path component without reliably ensuring the resolved path remains within an authorized directory and user context.
Potential impact
- An attacker may read files that are accessible to the server process.
- Sensitive application data or configuration could be exposed.
- Disclosed information could support further compromise of the application or its environment.
General mitigation guidance
Defensive approaches generally focus on treating path parameters as untrusted and enforcing directory boundaries.
- Prefer server-generated identifiers or allowlisted names over accepting filesystem paths from clients.
- Canonicalize paths and verify that the resolved location remains within the intended directory before file access.
- Bind export authorization to the authenticated user and the specific resource being requested.
- Limit the server process's filesystem permissions so it can access only the data it requires.
- Return generic errors that do not disclose filesystem paths or other sensitive details.
How teams detect issues like this
Review file-handling code for user-controlled path components, inconsistent authorization checks, and path validation performed before canonicalization. Static analysis can flag path construction from request parameters and file access without a verified directory boundary. Policy checks can require canonical-path containment and resource-level authorization; logs can also be reviewed for unusual traversal patterns and unexpected export targets.

