gh-114539: Clarify implicit launching of shells by subprocess#117996
Merged
zooba merged 2 commits intopython:mainfrom Apr 17, 2024
Merged
gh-114539: Clarify implicit launching of shells by subprocess#117996zooba merged 2 commits intopython:mainfrom
zooba merged 2 commits intopython:mainfrom
Conversation
gpshead
approved these changes
Apr 17, 2024
|
Thanks @zooba for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9, 3.10, 3.11, 3.12. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Apr 17, 2024
…ythonGH-117996) (cherry picked from commit a4b44d3) Co-authored-by: Steve Dower <steve.dower@python.org>
|
GH-118002 is a backport of this pull request to the 3.12 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Apr 17, 2024
…ythonGH-117996) (cherry picked from commit a4b44d3) Co-authored-by: Steve Dower <steve.dower@python.org>
|
GH-118003 is a backport of this pull request to the 3.11 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Apr 17, 2024
…ythonGH-117996) (cherry picked from commit a4b44d3) Co-authored-by: Steve Dower <steve.dower@python.org>
|
GH-118004 is a backport of this pull request to the 3.10 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Apr 17, 2024
…ythonGH-117996) (cherry picked from commit a4b44d3) Co-authored-by: Steve Dower <steve.dower@python.org>
|
GH-118005 is a backport of this pull request to the 3.9 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Apr 17, 2024
…ythonGH-117996) (cherry picked from commit a4b44d3) Co-authored-by: Steve Dower <steve.dower@python.org>
|
GH-118006 is a backport of this pull request to the 3.8 branch. |
zooba
added a commit
that referenced
this pull request
Apr 17, 2024
ambv
pushed a commit
that referenced
this pull request
May 7, 2024
ambv
pushed a commit
that referenced
this pull request
May 7, 2024
ambv
pushed a commit
that referenced
this pull request
May 7, 2024
hugovk
pushed a commit
that referenced
this pull request
Aug 9, 2024
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 is the same issue as recently disclosed by Rust (CVE-2024-24576), but as it is intentional operating system behaviour, we consider it to not be a Python vulnerability. If an attacker can influence the executable argument and other arguments, no reasonable validation can detect this case (without actually launching the executable and seeing what happens), and the app is exploitable already.
Rust was already detecting whether the executable was a batch file and changing their behaviour, which is why they chose to apply a fix. Python does no such detection, but relies exclusively on the
shellargument.📚 Documentation preview 📚: https://cpython-previews--117996.org.readthedocs.build/