Skip to content

Security: _extract_zip does not validate zip member paths (Zip Slip) #477

Description

@pranaysb

Summary

_extract_zip in src/trackers/utils/downloader.py calls zip_file.extractall(output_dir) without validating member paths.

A ZIP containing path traversals (../) or absolute paths could write files outside the intended output directory.

Proposed fix

Iterate zip_file.namelist() before extracting and reject any member whose resolved path falls outside output_dir.

I have a fix ready — happy to open a PR if this is worth addressing.

Note

I understand trackers download pulls from Roboflow's own GCP bucket, so the real-world risk is low. Flagging it in case you want to harden the utility for future use cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions