/

CVE-2024-58404

Severity:

HIGH RISK

(7.7)

Path Traversal (CWE-22) in Zipline User Data Export

CVE-2024-58404

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read

Severity:

HIGH RISK

(7.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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 name query 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.

Sources

SourceLink
github.comgithub.com/diced/zipline/security/advisories/GHSA-v38v-92cm-6mx8
vulncheck.comvulncheck.com/advisories/zipline-3.4.5-before-3.7.10-path-traversal-via-user-export-endpoint

Frequently asked

questions

The affected endpoint can be reached through the application, but exploitation requires an authenticated account and depends on the deployment's access controls.

An attacker needs authentication and the ability to make requests to the user data export endpoint.

Avoid using client-provided path values directly. Resolve paths securely, enforce containment within an approved directory, and verify authorization for the requested user's data.

Use allowlisted resource identifiers, apply consistent authorization checks, restrict filesystem permissions, and include path-handling rules in code review and automated analysis.

Find out what's already
exploitable in your codebase.