Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-114539: Clarify implicit launching of shells by subprocess#117996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks Steve! LGTM
a4b44d3
intopython:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@zooba for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9, 3.10, 3.11, 3.12. |
…ythonGH-117996)(cherry picked from commita4b44d3)Co-authored-by: Steve Dower <steve.dower@python.org>
GH-118002 is a backport of this pull request to the3.12 branch. |
…ythonGH-117996)(cherry picked from commita4b44d3)Co-authored-by: Steve Dower <steve.dower@python.org>
GH-118003 is a backport of this pull request to the3.11 branch. |
…ythonGH-117996)(cherry picked from commita4b44d3)Co-authored-by: Steve Dower <steve.dower@python.org>
GH-118004 is a backport of this pull request to the3.10 branch. |
…ythonGH-117996)(cherry picked from commita4b44d3)Co-authored-by: Steve Dower <steve.dower@python.org>
GH-118005 is a backport of this pull request to the3.9 branch. |
…ythonGH-117996)(cherry picked from commita4b44d3)Co-authored-by: Steve Dower <steve.dower@python.org>
GH-118006 is a backport of this pull request to the3.8 branch. |
Uh oh!
There was an error while loading.Please reload this page.
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
shell
argument.📚 Documentation preview 📚:https://cpython-previews--117996.org.readthedocs.build/