Skip to main content
MalwarePublished

expect-tests (PyPI) · Malicious Code

Affects expect-testsSource GCVE Database

0

Malicious package : remove expect-tests and rotate any secrets on hosts that installed it.

Data as of 8 Nov 2026, 10:51 UTC

Classification

Malicious package

Published to PyPI · OSV MAL-2026-18760

What to do

Remove expect-tests from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.

Affected software

ProductAffectedFixed in
PyPIexpect-testsAffected
  • =99.99.99
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

The PyPI package 'expect-tests' version 99.99.99 contains malicious code that exfiltrates the installer's hostname by encoding it into a subdomain and triggering DNS resolution to an unauthorized external server. This behavior occurs both during package installation and when the installed module is imported. The package exhibits suspicious characteristics such as a misleading version number and mismatched package and module names, consistent with a dependency confusion or name-squatting attack.

References

Community reviews

Loading reviews…