Skip to main content
MalwarePublished Updated

pyyi (PyPI) · Malicious Code

Affects pyyiSource GCVE Database

0

Malicious package : remove pyyi and rotate any secrets on hosts that installed it.

Data as of 20 Oct 2026, 22:45 UTC

Classification

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

ProductAffectedFixed in
PyPIpyyiAffected
  • 2.4 – 2.5.5
9 affected builds
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

Community reviews

Loading reviews…