poc-revshell (PyPI): malicious package ships reverse-shell backdoor triggered on pip install or import (no CVE)
Severity: critical · Patch status: no-fix-needed · Since 2026-10-29
The PyPI package poc-revshell 0.1.0 contains an embedded reverse-shell backdoor (CWE-506), flagged by Amazon Inspector and catalogued by OpenSSF/GitHub as malware. setup.py registers a PostInstall cmdclass that spawns a daemon thread during pip install: it connects a TCP socket to hardcoded 127.0.0.1:4444, dup2s the descriptor onto stdin/stdout/stderr, and execs /bin/sh -i (or cmd.exe on Windows). The same thread launch sits at module top level in init.py, so every import pocrevshell repeats the handoff. Any co-resident listener on port 4444 receives a full interactive shell under the installing user's identity. The loopback destination limits the attack to a local attacker on the installer's host. No fixed version exists; the package is malware and should be removed, not upgraded.
What to do
- Search environments for poc-revshell in dependency manifests, lockfiles, and installed site-packages and remove it
- Audit hosts where it was installed or imported for signs of a local listener on port 4444 and for unexpected shells or persistence
- Rotate credentials and review activity of accounts used for the install, assuming user-level compromise if exposure is suspected
- Block the package name in internal PyPI mirrors/proxies and alert on any future install attempts
- Review install-time execution policies (e.g. pip hooks, setup.py execution) in CI and developer images
Sources
All live incidents on Threat Watch