@@ -110,6 +110,14 @@ underlying :class:`Popen` interface can be used directly.
110
110
Added the *text * parameter, as a more understandable alias of *universal_newlines *.
111
111
Added the *capture_output * parameter.
112
112
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
+
113
121
.. class :: CompletedProcess
114
122
115
123
The return value from :func: `run `, representing a process that has finished.
@@ -486,6 +494,14 @@ functions.
486
494
*executable * parameter accepts a bytes and :term: `path-like object `
487
495
on Windows.
488
496
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
+
489
505
*stdin *, *stdout * and *stderr * specify the executed program's standard input,
490
506
standard output and standard error file handles, respectively. Valid values
491
507
are :data: `PIPE `, :data: `DEVNULL `, an existing file descriptor (a positive
@@ -1152,6 +1168,14 @@ calls these functions.
1152
1168
.. versionchanged :: 3.3
1153
1169
*timeout * was added.
1154
1170
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
+
1155
1179
.. function :: check_call(args, *, stdin=None, stdout=None, stderr=None, \
1156
1180
shell=False, cwd=None, timeout=None, \
1157
1181
**other_popen_kwargs)
@@ -1184,6 +1208,14 @@ calls these functions.
1184
1208
.. versionchanged :: 3.3
1185
1209
*timeout * was added.
1186
1210
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
+
1187
1219
1188
1220
.. function :: check_output(args, *, stdin=None, stderr=None, shell=False, \
1189
1221
cwd=None, encoding=None, errors=None, \
@@ -1239,6 +1271,14 @@ calls these functions.
1239
1271
.. versionadded :: 3.7
1240
1272
*text * was added as a more readable alias for *universal_newlines *.
1241
1273
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
+
1242
1282
1243
1283
.. _subprocess-replacements :
1244
1284
0 commit comments