pyyi (PyPI) · Malicious Code
Affects pyyiSource GCVE Database
Malicious package : remove pyyi and rotate any secrets on hosts that installed it.
Data as of 20 Oct 2026, 22:45 UTC
Malicious package
Published to PyPI · OSV MAL-2026-17866
What to do
Remove pyyi 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
| Product | Affected | Fixed in |
|---|---|---|
| PyPIpyyi | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
The pyyi package on PyPI is a malicious package that impersonates the Python interpreter and executes remote code supplied by a command-and-control server. It registers console commands named after Python executables (e.g., python3.7) that shadow legitimate interpreters and send system information to an obfuscated server. The package fetches, decodes, decompresses, and executes arbitrary Python code in memory without any integrity checks. It also includes a fake Python REPL that captures single-token inputs as passwords and sends them to the attacker. This combination enables remote code execution and credential theft on affected systems.
References
- pypi.org/project/pyyi/2.4.2/ (opens in a new tab)
- pypi.org/project/pyyi/2.4/ (opens in a new tab)
- pypi.org/project/pyyi/2.5.5/ (opens in a new tab)
- pypi.org/project/pyyi/2.5.2/ (opens in a new tab)
- pypi.org/project/pyyi/2.5.0/ (opens in a new tab)
- pypi.org/project/pyyi/2.5.1/ (opens in a new tab)
- pypi.org/project/pyyi/2.5.4/ (opens in a new tab)
- pypi.org/project/pyyi/2.5.3/ (opens in a new tab)