Skip to content

Reject unsafe members when extracting scrapbook archives - #88

Open
ranas-mukminov wants to merge 1 commit into
danny0838:mainfrom
ranas-mukminov:fix/extract-member-check
Open

ranas-mukminov wants to merge 1 commit into
danny0838:mainfrom
ranas-mukminov:fix/extract-member-check

Conversation

@ranas-mukminov

Copy link
Copy Markdown

Opening a scrapbook archive extracts every member without checking names, so a crafted archive could write outside the cache directory or plant a symlink, and the supported Python range starts at 3.8, where extractall does not sanitize names.

This checks every member for absolute paths, parent-directory components, and symlinks before extracting.

Tests: py_compile passes; no archive extraction was run.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant