Skip to content

fix: refuse to write files outside the target directory during sdist extraction - #10837

Merged
radoering merged 1 commit into
python-poetry:mainfrom
radoering:sdist-path-traversal
Apr 12, 2026
Merged

radoering merged 1 commit into
python-poetry:mainfrom
radoering:sdist-path-traversal

Conversation

@radoering

@radoering radoering commented Apr 12, 2026 •

Copy link
Copy Markdown
Member

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_filter because 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

  • Added tests for changed code.
  • Updated documentation for changed code.

…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>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@radoering
radoering merged commit 47e9734 into python-poetry:main Apr 12, 2026
54 checks passed
radoering added a commit that referenced this pull request Apr 12, 2026
…extraction (#10837)

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>
(cherry picked from commit 47e9734)
@dosubot

dosubot Bot commented Apr 12, 2026

Copy link
Copy Markdown

Documentation Updates

1 document(s) were updated by changes in this PR:

CHANGELOG
View 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
 

How did I do? Any feedback?  Join Discord

mwalbeck pushed a commit to mwalbeck/docker-python-poetry that referenced this pull request Apr 26, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [poetry](https://github.com/python-poetry/poetry) ([changelog](https://python-poetry.org/history/)) | patch | `2.3.3` → `2.3.4` |

---

### Release Notes

<details>
<summary>python-poetry/poetry (poetry)</summary>

### [`v2.3.4`](https://github.com/python-poetry/poetry/blob/HEAD/CHANGELOG.md#234---2026-04-12)

[Compare Source](python-poetry/poetry@2.3.3...2.3.4)

##### Fixed

- Fix a performance regression in the wheel installer that was introduced in Poetry 2.3.3 ([#&#8203;10821](python-poetry/poetry#10821)).
- Fix a path traversal vulnerability in sdist extraction on Python 3.10.0-3.10.12 and 3.11.0-3.11.4 that could allow malicious tarball files to write files outside the target directory ([#&#8203;10837](python-poetry/poetry#10837)).

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDQuNCIsInVwZGF0ZWRJblZlciI6IjQzLjEwNC40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://git.walbeck.it/mwalbeck/docker-python-poetry/pulls/1742
Co-authored-by: renovate-bot <bot@walbeck.it>
Co-committed-by: renovate-bot <bot@walbeck.it>
@github-actions

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 13, 2026
@radoering
radoering deleted the sdist-path-traversal branch August 22, 2026 05:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant