Malicious code in phenopacket-store-toolkit (PyPI)
The phenopacket-store-toolkit Python package version 0.1.7 contains a malicious .pth file that executes a Bun-based JavaScript credential stealer on every Python startup. This stealer downloads the Bun runtime, then runs obfuscated code to exfiltrate environment variables, .env files, SSH keys, cloud credentials, and other sensitive data to an attacker-controlled GitHub repository. It is part of the Hades/Miasma campaign attributed to the TeamPCP threat actor. The malicious code also attempts persistence and spreading by publishing infected packages using stolen credentials and may perform destructive actions if invalid GitHub tokens are detected.
AI Analysis
Technical Summary
The phenopacket-store-toolkit package version 0.1.7 includes a malicious phenopacket_store_toolkit-setup.pth file that leverages Python's site.py exec() mechanism to execute a Bun runtime-based JavaScript infostealer on every Python startup. This infostealer downloads the Bun runtime from GitHub, executes obfuscated JavaScript that collects a wide range of sensitive information including environment variables, .env files, SSH keys, cloud credentials, and cryptocurrency assets, and exfiltrates this data to an attacker-controlled GitHub repository. The campaign is linked to the Hades/Miasma (Shai-Hulud) threat actor TeamPCP. The malware includes sandbox detection and may attempt destructive actions such as wiping user data if invalid GitHub tokens are found. It also attempts to spread by publishing infected packages using stolen credentials. The campaign uses obfuscation and novel evasion techniques including embedding dangerous content to bypass AI-based security scanners.
Potential Impact
This malicious package compromises the confidentiality of sensitive data including environment variables, cloud and package repository credentials, SSH keys, cryptocurrency assets, and password manager data. It enables attackers to exfiltrate this data to a GitHub repository they control. The malware attempts persistence and lateral spread by publishing infected packages using stolen credentials. It may also perform destructive actions such as wiping user data if invalid tokens are detected. This poses a significant risk of credential theft, unauthorized access, and potential data loss for users of the affected package version.
Mitigation Recommendations
The malicious behavior is present in phenopacket-store-toolkit version 0.1.7. Users should immediately uninstall this version and avoid using it. Since no official patch or fixed version is indicated, remediation involves removing the compromised package and scanning systems for indicators such as the sentinel file /tmp/.bun_ran. Caution is advised during cleanup due to potential destructive payloads. Monitor for suspicious activity related to GitHub token usage and credential exfiltration. Check vendor advisories or PyPI for any updates or official fixes. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
Malicious code in phenopacket-store-toolkit (PyPI)
Description
The phenopacket-store-toolkit Python package version 0.1.7 contains a malicious .pth file that executes a Bun-based JavaScript credential stealer on every Python startup. This stealer downloads the Bun runtime, then runs obfuscated code to exfiltrate environment variables, .env files, SSH keys, cloud credentials, and other sensitive data to an attacker-controlled GitHub repository. It is part of the Hades/Miasma campaign attributed to the TeamPCP threat actor. The malicious code also attempts persistence and spreading by publishing infected packages using stolen credentials and may perform destructive actions if invalid GitHub tokens are detected.
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 phenopacket-store-toolkit package version 0.1.7 includes a malicious phenopacket_store_toolkit-setup.pth file that leverages Python's site.py exec() mechanism to execute a Bun runtime-based JavaScript infostealer on every Python startup. This infostealer downloads the Bun runtime from GitHub, executes obfuscated JavaScript that collects a wide range of sensitive information including environment variables, .env files, SSH keys, cloud credentials, and cryptocurrency assets, and exfiltrates this data to an attacker-controlled GitHub repository. The campaign is linked to the Hades/Miasma (Shai-Hulud) threat actor TeamPCP. The malware includes sandbox detection and may attempt destructive actions such as wiping user data if invalid GitHub tokens are found. It also attempts to spread by publishing infected packages using stolen credentials. The campaign uses obfuscation and novel evasion techniques including embedding dangerous content to bypass AI-based security scanners.
Potential Impact
This malicious package compromises the confidentiality of sensitive data including environment variables, cloud and package repository credentials, SSH keys, cryptocurrency assets, and password manager data. It enables attackers to exfiltrate this data to a GitHub repository they control. The malware attempts persistence and lateral spread by publishing infected packages using stolen credentials. It may also perform destructive actions such as wiping user data if invalid tokens are detected. This poses a significant risk of credential theft, unauthorized access, and potential data loss for users of the affected package version.
Mitigation Recommendations
The malicious behavior is present in phenopacket-store-toolkit version 0.1.7. Users should immediately uninstall this version and avoid using it. Since no official patch or fixed version is indicated, remediation involves removing the compromised package and scanning systems for indicators such as the sentinel file /tmp/.bun_ran. Caution is advised during cleanup due to potential destructive payloads. Monitor for suspicious activity related to GitHub token usage and credential exfiltration. Check vendor advisories or PyPI for any updates or official fixes. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-5322
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["PyPI"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a4f6c3868715ace431588d2
Added to database: 07/09/2026, 09:39:04 UTC
Last enriched: 07/09/2026, 09:52:33 UTC
Last updated: 07/31/2026, 12:27:30 UTC
Views: 50
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.