fix: refuse to write files outside the target directory during sdist extraction#10837
Merged
radoering merged 1 commit intopython-poetry:mainfrom Apr 12, 2026
Merged
Conversation
…extraction This has already been ensured with newer Python versions. Now, it is ensured with all supported versions, that means also with 3.10.0 - 3.10.12 and 3.11.0 - 3.11.4. Co-authored-by: Koda Reef <kodareef5@gmail.com>
|
Documentation Updates 1 document(s) were updated by changes in this PR: CHANGELOGView Changes@@ -1,4 +1,10 @@
# Change Log
+
+## [Unreleased]
+
+### Fixed
+
+- **Fix a path traversal vulnerability in sdist extraction that could allow malicious tarball files to write files outside the target directory on Python 3.10.0-3.10.12 and 3.11.0-3.11.4** ([#10837](https://github.com/python-poetry/poetry/pull/10837)).
## [2.3.3] - 2026-03-29
|
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This has already been ensured with newer Python versions. Now, it is ensured with all supported versions, that means also with 3.10.0 - 3.10.12 and 3.11.0 - 3.11.4.
Further, 3.9.17 has been removed from
broken_tarfile_filterbecause we do not support Python 3.9 anymore.In addition, test coverage is increased.
Note: A path traversal during sdist extraction is not as critical as it might seem because after extracting the sdist the project is built, which may result in arbitrary code execution by design.
Pull Request Check List