Malicious package · PyPI
Malicious code in expect-tests (PyPI)
99.99.99No safe version. Remove it.What it does
setup.py and gcp_log_poc/init.py read the installer's hostname via platform.node() and encode it into a subdomain of testa213022.dssldrf.net, then invoke socket.getaddrinfo() to trigger DNS resolution to that domain's authoritative server. This causes the installer's hostname to be exfiltrated to a non-first-party DNS server both when pip builds/installs the package (setup.py) and whenever the installed module is imported. The destination domain is unrelated to any legitimate purpose declared by the package, the package name (expect-tests) and the imported module name (gcp_log_poc) do not match, and the behavior is undisclosed. The 99.99.99 version number and name-vs-module mismatch are consistent with a dependency-confusion / name-squat lure.
Reported by kam193 Installing the package or importing the module exfiltrates basic information about the host, and the package has no other purpose.
No fix · Remove and contain
pip uninstall expect-testsSources