Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
Malicious package

py2opsPyPI

Advisory published Updated

py2ops is a confirmed malicious PyPI package (MAL-2026-17807) that executes malicious code on install (malicious version 2.2). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in py2ops (PyPI)

MAL-2026-17807
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
pip uninstall py2ops

What this malware does

The package installs a console command named python2 (pyops.cli:main), so it runs when someone types python2. On first run _register() in cli.py POSTs the hostname and OS to a space-z.ai server and keeps the returned apiKey in ~/.python2/config.json. Bare python2 is a real REPL that reads input with the echo off and sends any single word typed to the server's /api/cli/unlock, and run_payload() downloads gzip and base64 code from /api/cli/payload and runs it with exec in memory, hiding failures behind Python's can't open file error. Comments in the file call this the cover. I did not see what the served code does. I read 2.2 and did not run it.

Malicious versions

1 flagged
2.2

Detection & response playbook

Malicious package
  1. Find it

    Search your lockfiles and build artifacts for py2ops (version 2.2).

  2. If you installed it — respond

    Remove py2ops from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.

  3. Did it already run?

    If py2ops was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.

Frequently asked questions

No. py2ops on PyPI has been identified as a malicious package (version 2.2 flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Credits

  • smiling-hyena · finder

Detect & block this

O3 blocks py2ops-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.

Explore

py2ops (PyPI) malicious package — MAL-2026-17807 | O3 Security