Skip to main content
MalwarePublished Updated

py2ops (PyPI) · Malicious Code

Affects py2opsSource GCVE Database

0

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

Data as of 25 Nov 2026, 07:47 UTC

Classification

Malicious package

Published to PyPI · OSV MAL-2026-17807

What to do

Remove py2ops 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
PyPIpy2opsAffected
  • 2.2 – 2.3.1
4 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 py2ops package on PyPI installs a malicious CLI tool named 'python2' that masquerades as the real Python 2 interpreter. When run, it registers the host with a remote server, sending hostname and OS details, and receives an API key stored locally. The tool then acts as a backdoor, fetching and executing arbitrary code from the attacker's server in memory without writing to disk. It also captures any single-word input typed by the user, such as passwords or tokens, and exfiltrates them to the attacker. This creates a persistent remote code execution channel and credential theft mechanism under attacker control.

References

Community reviews

Loading reviews…