sdk/python/Archives

Archives

tarfile, zipfile — archive extraction (zip slip, bombs)

All 9Sink: 3
PyBz2
bz2

Python stdlib module — bz2. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

6 methods
PyGzip
gzip

Python stdlib module — gzip. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

7 methods
PyLzma
lzma

Python stdlib module — lzma. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

8 methods
PyTarfile
tarfile

The tarfile module. extractall() and extract() follow archive entry paths as-is — path-traversal sink (zip slip) when the archive is user-supplied and extractall's filter= argument is not set to a safe filter. Python 3.12 changed the default to 'data'.

2 sinks3 methods
PyZipapp
zipapp

Python stdlib module — zipapp. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

4 methods
PyZipfile
zipfile

The zipfile module. ZipFile.extractall() and extract() are zip-slip sinks when the archive is untrusted. Python's extractall resolves .. segments in archive members to paths outside the target directory.

2 sinks2 methods
PyZipimport
zipimport

Python stdlib module — zipimport. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

2 methods
PyZlib
zlib

The zlib module for compression. decompress() on untrusted input can consume unbounded memory (zip bomb / decompression amplification). Set max_length to cap output.

1 sink2 methods
PyZstd
zstd

Third-party Python package module — zstd. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

10 methods