Malicious code in pyphetools (PyPI)
The pyphetools package version 0.9.120 on PyPI contains a malicious .pth file that executes a Bun-based JavaScript credential stealer on every Python startup. This malware exfiltrates 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 and includes obfuscation and sandbox detection techniques. The malicious code may also attempt destructive actions if invalid GitHub tokens are detected.
AI Analysis
Technical Summary
The pyphetools package version 0.9.120 includes a malicious .pth file named pyphetools-setup.pth that leverages CPython's site.py exec() mechanism to run an obfuscated JavaScript infostealer via the Bun runtime on every Python startup. This infostealer collects a wide range of sensitive data including environment variables, .env files, SSH keys, cloud credentials, and cryptocurrency assets. It exfiltrates data to a GitHub repository controlled by the attacker and attempts persistence and propagation by publishing infected packages using stolen credentials. The campaign is linked to the Hades/Miasma (Shai-Hulud) threat actor TeamPCP and uses advanced evasion techniques such as embedding dangerous-content text to bypass AI-based security scanners. The malware also includes destructive capabilities triggered by invalid GitHub tokens. The threat is categorized as malicious with clear intent to steal credentials and cause damage.
Potential Impact
The malicious package compromises the confidentiality of sensitive information including environment variables, cloud tokens, SSH keys, cryptocurrency assets, and password manager data. It enables attackers to exfiltrate credentials and secrets, potentially leading to further compromise of user systems and cloud environments. The malware also attempts persistence and propagation by publishing infected packages, increasing the risk of widespread infection. Additionally, it may perform destructive actions if certain conditions are met, posing a risk of data loss.
Mitigation Recommendations
No official patch or fix is currently available for this malicious package. Users should immediately uninstall pyphetools version 0.9.120 and avoid installing or using this compromised version. Inspect systems for the presence of the sentinel file /tmp/.bun_ran and remove any related malicious files. Exercise caution during cleanup due to potential destructive payloads. Monitor for suspicious activity related to GitHub token usage and revoke any exposed credentials. Use trusted package sources and verify package integrity before installation to prevent similar supply chain attacks.
Malicious code in pyphetools (PyPI)
Description
The pyphetools package version 0.9.120 on PyPI contains a malicious .pth file that executes a Bun-based JavaScript credential stealer on every Python startup. This malware exfiltrates 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 and includes obfuscation and sandbox detection techniques. The malicious code may also attempt 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 pyphetools package version 0.9.120 includes a malicious .pth file named pyphetools-setup.pth that leverages CPython's site.py exec() mechanism to run an obfuscated JavaScript infostealer via the Bun runtime on every Python startup. This infostealer collects a wide range of sensitive data including environment variables, .env files, SSH keys, cloud credentials, and cryptocurrency assets. It exfiltrates data to a GitHub repository controlled by the attacker and attempts persistence and propagation by publishing infected packages using stolen credentials. The campaign is linked to the Hades/Miasma (Shai-Hulud) threat actor TeamPCP and uses advanced evasion techniques such as embedding dangerous-content text to bypass AI-based security scanners. The malware also includes destructive capabilities triggered by invalid GitHub tokens. The threat is categorized as malicious with clear intent to steal credentials and cause damage.
Potential Impact
The malicious package compromises the confidentiality of sensitive information including environment variables, cloud tokens, SSH keys, cryptocurrency assets, and password manager data. It enables attackers to exfiltrate credentials and secrets, potentially leading to further compromise of user systems and cloud environments. The malware also attempts persistence and propagation by publishing infected packages, increasing the risk of widespread infection. Additionally, it may perform destructive actions if certain conditions are met, posing a risk of data loss.
Mitigation Recommendations
No official patch or fix is currently available for this malicious package. Users should immediately uninstall pyphetools version 0.9.120 and avoid installing or using this compromised version. Inspect systems for the presence of the sentinel file /tmp/.bun_ran and remove any related malicious files. Exercise caution during cleanup due to potential destructive payloads. Monitor for suspicious activity related to GitHub token usage and revoke any exposed credentials. Use trusted package sources and verify package integrity before installation to prevent similar supply chain attacks.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-5324
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["PyPI"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a4f6c6168715ace4315a03a
Added to database: 07/09/2026, 09:39:45 UTC
Last enriched: 07/09/2026, 10:03:39 UTC
Last updated: 07/31/2026, 12:27:30 UTC
Views: 5
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.