@@ -111,6 +111,14 @@ underlying :class:`Popen` interface can be used directly.
111
111
Added the *text * parameter, as a more understandable alias of *universal_newlines *.
112
112
Added the *capture_output * parameter.
113
113
114
+ .. versionchanged :: 3.11.2
115
+
116
+ Changed Windows shell search order for ``shell=True ``. The current
117
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
118
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
119
+ malicious program named ``cmd.exe `` into a current directory no
120
+ longer works.
121
+
114
122
.. class :: CompletedProcess
115
123
116
124
The return value from :func: `run `, representing a process that has finished.
@@ -488,6 +496,14 @@ functions.
488
496
*executable * parameter accepts a bytes and :term: `path-like object `
489
497
on Windows.
490
498
499
+ .. versionchanged :: 3.11.2
500
+
501
+ Changed Windows shell search order for ``shell=True ``. The current
502
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
503
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
504
+ malicious program named ``cmd.exe `` into a current directory no
505
+ longer works.
506
+
491
507
*stdin *, *stdout * and *stderr * specify the executed program's standard input,
492
508
standard output and standard error file handles, respectively. Valid values
493
509
are :data: `PIPE `, :data: `DEVNULL `, an existing file descriptor (a positive
@@ -1160,6 +1176,14 @@ calls these functions.
1160
1176
.. versionchanged :: 3.3
1161
1177
*timeout * was added.
1162
1178
1179
+ .. versionchanged :: 3.11.2
1180
+
1181
+ Changed Windows shell search order for ``shell=True ``. The current
1182
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
1183
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
1184
+ malicious program named ``cmd.exe `` into a current directory no
1185
+ longer works.
1186
+
1163
1187
.. function :: check_call(args, *, stdin=None, stdout=None, stderr=None, \
1164
1188
shell=False, cwd=None, timeout=None, \
1165
1189
**other_popen_kwargs)
@@ -1192,6 +1216,14 @@ calls these functions.
1192
1216
.. versionchanged :: 3.3
1193
1217
*timeout * was added.
1194
1218
1219
+ .. versionchanged :: 3.11.2
1220
+
1221
+ Changed Windows shell search order for ``shell=True ``. The current
1222
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
1223
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
1224
+ malicious program named ``cmd.exe `` into a current directory no
1225
+ longer works.
1226
+
1195
1227
1196
1228
.. function :: check_output(args, *, stdin=None, stderr=None, shell=False, \
1197
1229
cwd=None, encoding=None, errors=None, \
@@ -1247,6 +1279,14 @@ calls these functions.
1247
1279
.. versionadded :: 3.7
1248
1280
*text * was added as a more readable alias for *universal_newlines *.
1249
1281
1282
+ .. versionchanged :: 3.11.2
1283
+
1284
+ Changed Windows shell search order for ``shell=True ``. The current
1285
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
1286
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
1287
+ malicious program named ``cmd.exe `` into a current directory no
1288
+ longer works.
1289
+
1250
1290
1251
1291
.. _subprocess-replacements :
1252
1292
0 commit comments