@@ -110,6 +110,14 @@ underlying :class:`Popen` interface can be used directly.
110110 Added the *text * parameter, as a more understandable alias of *universal_newlines *.
111111 Added the *capture_output * parameter.
112112
113+ .. versionchanged :: 3.10.11
114+
115+ Changed Windows shell search order for ``shell=True ``. The current
116+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
117+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
118+ malicious program named ``cmd.exe `` into a current directory no
119+ longer works.
120+
113121.. class :: CompletedProcess
114122
115123 The return value from :func: `run `, representing a process that has finished.
@@ -486,6 +494,14 @@ functions.
486494 *executable * parameter accepts a bytes and :term: `path-like object `
487495 on Windows.
488496
497+ .. versionchanged :: 3.10.11
498+
499+ Changed Windows shell search order for ``shell=True ``. The current
500+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
501+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
502+ malicious program named ``cmd.exe `` into a current directory no
503+ longer works.
504+
489505 *stdin *, *stdout * and *stderr * specify the executed program's standard input,
490506 standard output and standard error file handles, respectively. Valid values
491507 are :data: `PIPE `, :data: `DEVNULL `, an existing file descriptor (a positive
@@ -1152,6 +1168,14 @@ calls these functions.
11521168 .. versionchanged :: 3.3
11531169 *timeout * was added.
11541170
1171+ .. versionchanged :: 3.10.11
1172+
1173+ Changed Windows shell search order for ``shell=True ``. The current
1174+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
1175+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
1176+ malicious program named ``cmd.exe `` into a current directory no
1177+ longer works.
1178+
11551179.. function :: check_call(args, *, stdin=None, stdout=None, stderr=None, \
11561180 shell=False, cwd=None, timeout=None, \
11571181 **other_popen_kwargs)
@@ -1184,6 +1208,14 @@ calls these functions.
11841208 .. versionchanged :: 3.3
11851209 *timeout * was added.
11861210
1211+ .. versionchanged :: 3.10.11
1212+
1213+ Changed Windows shell search order for ``shell=True ``. The current
1214+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
1215+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
1216+ malicious program named ``cmd.exe `` into a current directory no
1217+ longer works.
1218+
11871219
11881220.. function :: check_output(args, *, stdin=None, stderr=None, shell=False, \
11891221 cwd=None, encoding=None, errors=None, \
@@ -1239,6 +1271,14 @@ calls these functions.
12391271 .. versionadded :: 3.7
12401272 *text * was added as a more readable alias for *universal_newlines *.
12411273
1274+ .. versionchanged :: 3.10.11
1275+
1276+ Changed Windows shell search order for ``shell=True ``. The current
1277+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
1278+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
1279+ malicious program named ``cmd.exe `` into a current directory no
1280+ longer works.
1281+
12421282
12431283.. _subprocess-replacements :
12441284
0 commit comments