CVE-2026-40258: Python Zipfile Extractall Zip Slip

`extractall()` is called on an archive object without first validating member entries against path traversal (Zip Slip). Python's `zipfile` module does not sanitize `..` or absolute path entries, so a crafted archive can write files outside the destination directory. Before calling `extractall`, iterate `namelist()`/`infolist()`, resolve each entry with `os.

Provally CuratedPublic repositoryHighHigh confidenceVerifiedApache-2.0Python
greprules fetch cve-2026-40258-python-zipfile-extractall-zip-slip --engine opengrep

Description

`extractall()` is called on an archive object without first validating member entries against path traversal (Zip Slip). Python's `zipfile` module does not sanitize `..` or absolute path entries, so a crafted archive can write files outside the destination directory. Before calling `extractall`, iterate `namelist()`/`infolist()`, resolve each entry with `os.