Skip to content

Commit 31d3836

Browse files
authored
pythongh-138158: Use the "data" tarfile extraction filter in Tools/ssl/multissltests.py (python#138147)
The `Tools/ssl/multissltests.py` script may extract a possibly untrusted tarball. Since the script does not necessarily use Python 3.14 or later (where the `"data"` filter became the default `tarfile` extraction filter), the user may theoretically suffer from a path traversal attack. Although the script should not be used in production and usually relies on downloading trusted sources, the `"data"` extraction filter is now explicitly used wherever relevant.
1 parent bacb777 commit 31d3836

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tools/ssl/multissltests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def _unpack_src(self):
306306
raise ValueError(member.name, base)
307307
member.name = member.name[len(base):].lstrip('/')
308308
log.info("Unpacking files to {}".format(self.build_dir))
309-
tf.extractall(self.build_dir, members)
309+
tf.extractall(self.build_dir, members, filter='data')
310310

311311
def _build_src(self, config_args=()):
312312
"""Now build openssl"""

0 commit comments

Comments
 (0)