Skip to main content
MalwarePublished Updated

ensmallen (PyPI) · Malicious Code

Affects ensmallenSource GCVE Database

0

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

Data as of 9 Jul 2026, 10:04 UTC

Classification

Malicious package

Published to PyPI · OSV MAL-2026-5315

What to do

Remove ensmallen 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
PyPIensmallenAffected
  • =0.8.101
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

The ensmallen package version 0.8.101 on PyPI was found to contain malicious code acting as an infostealer. This heavily obfuscated JavaScript code runs via the Bun runtime on Python startup and collects sensitive data such as API keys, package repository credentials, cryptocurrency assets, and password manager information. It also attempts to gain persistence and spread by publishing infected packages using stolen credentials. The malware may exfiltrate data through GitHub and threatens to wipe user data if invalid GitHub tokens are detected. This compromise is linked to the Mini Shai Hulud campaign and involves sandbox detection and destructive actions.

References

Community reviews

Loading reviews…