shadowlm/remote.py:171-175:
try:
tar.extractall(dest, filter="data")
except TypeError: # Python < 3.12 has no filter= kwarg
tar.extractall(dest) # noqa: S202 — archive comes from our server
pyproject.toml sets requires-python = ">=3.10", so the unfiltered branch is live on Python 3.10 and 3.11. The transport is plain HTTP via urllib (remote.py:84), so a malicious or MITM'd server can ship a tar member with ../ components and write arbitrary paths on the client machine. The noqa justification ("archive comes from our server") does not hold once the client can point at any host, which is the whole point of backend="remote".
Fix options:
- Backport the sanitization: iterate members, reject absolute paths,
.. components, symlinks/hardlinks escaping dest, then extract. Small function, no new deps.
- Or require Python >= 3.12 for the remote artifact path and fail with an actionable error on older interpreters.
Option 1 is the right call given the declared floor.
shadowlm/remote.py:171-175:pyproject.tomlsetsrequires-python = ">=3.10", so the unfiltered branch is live on Python 3.10 and 3.11. The transport is plain HTTP viaurllib(remote.py:84), so a malicious or MITM'd server can ship a tar member with../components and write arbitrary paths on the client machine. Thenoqajustification ("archive comes from our server") does not hold once the client can point at any host, which is the whole point ofbackend="remote".Fix options:
..components, symlinks/hardlinks escapingdest, then extract. Small function, no new deps.Option 1 is the right call given the declared floor.