Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Undocumented risky behaviour in subprocess module #101283

Closed
@mauricelambert

Description

@mauricelambert

Bug report - Undocumented risky behaviour in subprocess module

When usingsubprocess.Popen withshell=True on Windows and without aCOMSPEC environment variable, acmd.exe is launched. The problem is thecmd.exe full path is not written, Windows will search the executable in the current directory and in the PATH. If an arbitrary executable file is written to the current directory or to a directory in the PATH, it can be run instead of the real cmd.exe.

See the codehere and a POChere.

  • This risky behaviour can be patched by replacingcmd.exe string byC:\WINDOWS\system32\cmd.exe.
  • If the behavior was chosen by python developers, it should be documented.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp