Malicious code in dreamgen (PyPI)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (518c5b1627018ff52b8f3b8e83d862735009be6eaed3595922195bb3b45e6162) The package was found to contain malicious code or consuming dependency that contains malicious code ## Source: kam193 (d13836e2a6e18233bd22274b546345ad8ae8959fa00ad1c3d473568feed3f6d3) Versions 1.8.1 were compromised. Compromised packages start an obfuscated infostealer. The infostealer is a heavily obfuscated JavaScript code executed using Bun runtime on Python startup. It collectes all kinds of sensitive data, including API keys, credentials to package repositories, cryptocurrency assets, password manager data. Infostealer actively queries online services to collect additional secrets as well as attempts to gain persistence and spread further by publishing infected packages using collected credentials. Data are exfiltrated likely using Github. The code seems to threaten to wipe the user's data if it detects invalid GitHub tokens. Cleanup should be done with caution. It seems to be related to the recent Mini Shai Hulud campaign. --- Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers. Campaign: 2026-06-compr-woodpecker Reasons (based on the campaign): - compromised-package - exfiltration-env-variables - exfiltration-cloud-tokens - exfiltration-credentials - abuses-pth - obfuscation - infostealer - The package contains code to detect if it is running in a sandbox environment. - exfiltration-crypto - files-exfiltration - destructive-actions
AI Analysis
Technical Summary
The compromised dreamgen package version 1.8.1 contains heavily obfuscated JavaScript malware executed in the Bun runtime environment on Python startup. The malware functions as an infostealer, harvesting 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. The exfiltration mechanism likely uses GitHub repositories. The malware includes destructive capabilities, threatening to wipe user data if invalid GitHub tokens are detected. It also detects sandbox environments to avoid detection. This incident is associated with the Mini Shai Hulud campaign, indicating a coordinated malicious campaign targeting package ecosystems.
Potential Impact
Users installing dreamgen version 1.8.1 risk exposure of sensitive data including API keys, credentials for package repositories, cryptocurrency assets, and password manager data. The malware's ability to exfiltrate data and spread by publishing infected packages can lead to further compromise of developer environments and supply chains. The destructive potential to wipe user data increases the risk of data loss. This compromises confidentiality, integrity, and availability of affected systems and data.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately avoid using dreamgen version 1.8.1 and remove any installations of this version. Due to the malware's destructive capabilities, cleanup should be performed with caution, ideally by restoring from known good backups and conducting thorough environment scans. Monitor for suspicious activity related to package publishing and credential use. Check vendor advisories or PyPI for updates or official guidance regarding this incident.
Malicious code in dreamgen (PyPI)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (518c5b1627018ff52b8f3b8e83d862735009be6eaed3595922195bb3b45e6162) The package was found to contain malicious code or consuming dependency that contains malicious code ## Source: kam193 (d13836e2a6e18233bd22274b546345ad8ae8959fa00ad1c3d473568feed3f6d3) Versions 1.8.1 were compromised. Compromised packages start an obfuscated infostealer. The infostealer is a heavily obfuscated JavaScript code executed using Bun runtime on Python startup. It collectes all kinds of sensitive data, including API keys, credentials to package repositories, cryptocurrency assets, password manager data. Infostealer actively queries online services to collect additional secrets as well as attempts to gain persistence and spread further by publishing infected packages using collected credentials. Data are exfiltrated likely using Github. The code seems to threaten to wipe the user's data if it detects invalid GitHub tokens. Cleanup should be done with caution. It seems to be related to the recent Mini Shai Hulud campaign. --- Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers. Campaign: 2026-06-compr-woodpecker Reasons (based on the campaign): - compromised-package - exfiltration-env-variables - exfiltration-cloud-tokens - exfiltration-credentials - abuses-pth - obfuscation - infostealer - The package contains code to detect if it is running in a sandbox environment. - exfiltration-crypto - files-exfiltration - 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 compromised dreamgen package version 1.8.1 contains heavily obfuscated JavaScript malware executed in the Bun runtime environment on Python startup. The malware functions as an infostealer, harvesting 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. The exfiltration mechanism likely uses GitHub repositories. The malware includes destructive capabilities, threatening to wipe user data if invalid GitHub tokens are detected. It also detects sandbox environments to avoid detection. This incident is associated with the Mini Shai Hulud campaign, indicating a coordinated malicious campaign targeting package ecosystems.
Potential Impact
Users installing dreamgen version 1.8.1 risk exposure of sensitive data including API keys, credentials for package repositories, cryptocurrency assets, and password manager data. The malware's ability to exfiltrate data and spread by publishing infected packages can lead to further compromise of developer environments and supply chains. The destructive potential to wipe user data increases the risk of data loss. This compromises confidentiality, integrity, and availability of affected systems and data.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately avoid using dreamgen version 1.8.1 and remove any installations of this version. Due to the malware's destructive capabilities, cleanup should be performed with caution, ideally by restoring from known good backups and conducting thorough environment scans. Monitor for suspicious activity related to package publishing and credential use. Check vendor advisories or PyPI for updates or official guidance regarding this incident.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-5313
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["PyPI"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a50ba4968715ace4357e93d
Added to database: 07/10/2026, 09:24:25 UTC
Last enriched: 07/10/2026, 09:37:20 UTC
Last updated: 07/27/2026, 14:25:54 UTC
Views: 8
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.