shanksPyPI
Advisory published Updated
shanks is a confirmed malicious PyPI package (MAL-2026-19051) that executes malicious code on install (malicious version 0.0.4). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in shanks (PyPI)
What this malware does
The module shanks/shanks.py, when imported, looks up the machine's public IP address and location from a geolocation service and posts the IP address, city, state, postal code, latitude and longitude, with an @everyone mention, to a hard-coded Discord webhook. The package describes itself only as "A small example pkg". Version examined: 0.0.4; sdist SHA-256 dc417305d4b083a60ffda7aa310952306258fc12afc536a0641fc4a79c95bed8.
Malicious versions
Detection & response playbook
Malicious packageFind it
Search your lockfiles and build artifacts for shanks (version 0.0.4).
If you installed it — respond
Remove shanks 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.
Did it already run?
If shanks 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
Credits
- Cordon Security, Inc. · finder
- Oluwatosin Amokeodo · finder
Detect & block this
O3 blocks shanks-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.