CVE-2022-44900: py7zr extractall Dir Trav Flaw | Miggo
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from three key areas:
extractall()'s path handling: The pre-patch code used path.joinpath(remove_relative_path_marker(...)) without resolving the full path, making relative_to() checks bypassable.
writef()/writestr() input validation: The commit added check_archive_path() validation to these methods, indicating they previously lacked path sanitization when adding files to archives.
Symlink/junction handling: The patch added is_target_path_valid checks during extraction, showing the original extraction logic didn't properly validate symlink destinations.
The GitHub commit explicitly modifies these functions and adds new path validation logic, confirming these were the vulnerable entry points.