Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in ensmallen (PyPI)

0
Critical
Published: 06/06/2026 (06/06/2026, 06:13:57 UTC)
Source: GCVE Database
Product: ensmallen

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.

Affected software

PyPIghsa
ensmallen
Affected versions
=0.8.101

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/09/2026, 10:04:02 UTC

Technical Analysis

The ensmallen PyPI package version 0.8.101 was compromised to include heavily obfuscated JavaScript infostealer code executed by the Bun runtime during Python startup. The malicious code collects a wide range of sensitive information including environment variables, cloud tokens, credentials, and cryptocurrency data. It actively queries online services to gather additional secrets and attempts to maintain persistence and propagate by publishing infected packages using stolen credentials. Data exfiltration likely occurs via GitHub. The malware also includes destructive functionality that may wipe user data if invalid GitHub tokens are detected. This incident is associated with the Mini Shai Hulud campaign and demonstrates multiple malicious behaviors such as sandbox evasion, obfuscation, and credential theft.

Potential Impact

Sensitive user data including API keys, package repository credentials, cryptocurrency assets, and password manager data can be stolen. The malware can spread further by publishing infected packages using stolen credentials, potentially compromising additional users. There is also a risk of destructive actions such as wiping user data if certain conditions are met. This compromises confidentiality, integrity, and availability of affected systems and data.

Mitigation Recommendations

No official patch or remediation is currently available. Users should avoid using ensmallen version 0.8.101. Cleanup should be performed with caution due to the malware's destructive capabilities. It is recommended to remove the compromised package, revoke any exposed credentials, and monitor for unauthorized package publishing activity. Check vendor or PyPI advisories for updates or official fixes.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-5315
Osv Schema Version
1.7.4
Aliases
[]
Ecosystems
["PyPI"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a4f6c6168715ace4315a052

Added to database: 07/09/2026, 09:39:45 UTC

Last enriched: 07/09/2026, 10:04:02 UTC

Last updated: 07/27/2026, 02:50:22 UTC

Views: 11

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses