cvelo
P2 · HighMalware

Malicious code in expect-tests (PyPI)

  • GHSA-6j7m-w72r-qp6x

Description

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. --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/452e31d9fc58339d97d3fd0a82ef67b846f63d34/osv/malicious/pypi/expect-tests/MAL-2026-18760.json))

Text from the GitHub Advisory record.

Recommendation

Remove the package and rotate any secret the machine that installed it could reach. There is no version to update to.

Affected

  • expect-testsPyPI

    No versions listed

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.