FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.11] gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windows (GH-146591) by serhiy-storchaka · Pull Request #149071 · python/cpython · GitHub

/ cpython Public

[3.11] gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windows (GH-146591) - #149071

Merged
pablogsal merged 1 commit into
python:3.11from
serhiy-storchaka:backport-fc829e8-3.11
Aug 9, 2026
Merged

[3.11] gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windows (GH-146591)#149071
pablogsal merged 1 commit into
python:3.11from
serhiy-storchaka:backport-fc829e8-3.11

Conversation

serhiy-storchaka commented Apr 27, 2026
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Use ZipFile.extractall() to sanitize file names and extract files.

Files with invalid names (e.g. absolute paths) are now skipped.

Files containing ".." in the name are no longer skipped.

(cherry picked from commit fc829e8)

… files on Windows (pythonGH-146591)

Use ZipFile.extractall() to sanitize file names and extract files.

Files with invalid names (e.g. absolute paths) are now skipped.

Files containing ".." in the name are no longer skipped.

(cherry picked from commit fc829e8)

Copy link
Copy Markdown
Member Author

Ping. Merging this PR is needed for backport to 3.10.

pablogsal merged commit 7ef7dd0 into python:3.11 Aug 9, 2026
25 checks passed

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

bedevere-app Bot commented Aug 9, 2026

Copy link
Copy Markdown

GH-155440 is a backport of this pull request to the 3.10 branch.

bedevere-app Bot removed the needs backport to 3.10 only security fixes label Aug 9, 2026
pablogsal pushed a commit that referenced this pull request Aug 10, 2026
…P files on Windows (GH-146591) (GH-149071) (#155440)

[3.11] gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windows (GH-146591) (GH-149071)

gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windows (GH-146591)

Use ZipFile.extractall() to sanitize file names and extract files.

Files with invalid names (e.g. absolute paths) are now skipped.

Files containing ".." in the name are no longer skipped.
(cherry picked from commit 7ef7dd0)


(cherry picked from commit fc829e8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-security A security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL