GHSA-6j7m-w72r-qp6x
Malicious code in expect-tests (PyPI)
Impact
## Source: amazon-inspector (f693b92cac909344a9cbab93f5f80ab6d820759af5042d323d90f10351d39d76) 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))
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| pip | expect-tests | = 99.99.99 | none recorded |
Weakness classification
References
- GitHub advisory
- https://github.com/advisories/GHSA-6j7m-w72r-qp6x
- https://github.com/ossf/malicious-packages/blob/452e31d9fc58339d97d3fd0a82ef67b846f63d34/osv/malicious/pypi/expect-tests/MAL-2026-18760.json
- https://pypi.org/project/expect-tests/99.99.99
- https://bad-packages.kam193.eu/pypi/package/expect-tests
- https://github.com/ossf/malicious-packages/blob/5153a1d38e375dbb528b1b9180cb4e31b946e7a1/osv/malicious/pypi/expect-tests/MAL-2026-18760.json