Malicious code in ensmallen (PyPI)
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.
AI Analysis
Technical Summary
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.
Malicious code in ensmallen (PyPI)
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
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
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.