Launch Week Day 1: Announcing Security Design Review
CRITICAL PyPI Malware

Malicious code in bash8 (PyPI)

MAL-2026-5768

Published · Modified

Description


__

Source: amazon-inspector (375ef978992bd3c12f8778e62d2c6f8a105fa3a15cc508db6d8dd6043fd7507c)

setup.py overrides the install command with a custom InstallWithBeacon class that, on pip install, collects the installer's hostname via socket.gethostname() and resolves it to an IP via socket.gethostbyname(), then POSTs both as JSON to the hardcoded URL https://webhook.site/b32fda38-ab07-4dc4-820d-548bd5011f78 before continuing the install (setup.py lines 7, 13-15, 30). The pyproject.toml description self-identifies the package as 'POC package (beacon-only)' with placeholder author 'Your Name', confirming the package has no legitimate functionality — its only effect is the recon beacon. Every installer's host identifiers are silently transmitted to an attacker-controlled endpoint without consent.

Source: kam193 (cc82142b2f705e97dabfd2945e1f4686296211b857a6ccda5195803650bddf63)

Installing the package or importing the module exfiltrates basic information about the host, and the package has no other purpose.


Category: PROBABLY_PENTEST - Packages looking like typical pentest packages, but also anything that looks like testing, exploring pre-prepared kits, research & co, with clearly low-harm possibilities.

Campaign: GENERIC-standard-pypi-install-pentest

Reasons (based on the campaign):

  • The package contains code to exfiltrate basic data from the system, like IP or username. It has a limited risk.

  • The package overrides the install command in setup.py to execute malicious code during installation.

Ready to move

Start Securing

Free, no credit card | First findings in minutes