Miasma, Hades Worms Target npm, PyPI

Miasma and Hades Worms Continue Supply Chain Attacks on npm and PyPI

HIGH
July 22, 2026
August 11, 2026
5m read
Supply Chain AttackMalwareThreat Actor

Related Entities(initial)

Threat Actors

TeamPCP

Products & Tech

npmPyPIGitHub

Other

MiasmaHadesMini Shai-Hulud

Full Report(when first published)

Executive Summary

The open-source software supply chain is under sustained attack from a campaign involving self-propagating worms named Miasma (targeting npm) and Hades (targeting PyPI). This campaign, attributed to the threat actor group TeamPCP, is designed to harvest developer credentials at scale by infecting popular libraries and spreading to new packages. The Hades variant introduced a new persistence mechanism using .pth files to ensure its malicious code executes automatically. This ongoing attack underscores the fragility of the software supply chain, where the compromise of a single developer account can lead to the widespread distribution of malware through trusted dependency channels.

Threat Overview

The campaign began with the Miasma worm on npm and later expanded to PyPI with the Hades variant. The core objective is credential theft. The financially motivated group TeamPCP has been linked to the operation. Across both ecosystems, the campaign has resulted in over 100 compromised packages and more than 471 distinct malicious artifacts.

The attack specifically targets libraries related to bioinformatics, graph machine learning, and the Model Context Protocol (MCP), suggesting a focus on developers working in specialized, data-rich fields. The worm's ability to mutate and split its loader and payload during the campaign indicates a degree of sophistication aimed at evading static scanners and detection tools.

Technical Analysis

The worm's attack cycle is a clear example of T1195.001 - Compromise Software Dependencies and Development Tools.

  1. Infection: A developer installs a malicious package from npm or PyPI, either through typosquatting or because a legitimate package they depend on has been compromised.
  2. Execution & Persistence (Hades Variant): The Hades worm on PyPI uses a *-setup.pth file. A .pth file is a path configuration file that Python processes upon startup. By placing malicious code in this file, the attacker ensures their payload runs automatically whenever the developer's Python interpreter starts. This payload then fetches the Bun JavaScript runtime to execute the primary malicious logic.
  3. Credential Harvesting: The worm's payload scours the developer's machine for credentials, such as environment variables, configuration files (.npmrc, .git-credentials), and SSH keys (T1552 - Unsecured Credentials).
  4. Exfiltration and Propagation: The stolen credentials, particularly API tokens for npm, PyPI, and GitHub, are exfiltrated by publishing them to new, attacker-controlled GitHub repositories (T1537 - Transfer Data to Cloud Account). The attackers then use the stolen PyPI/npm credentials to publish new malicious packages or update existing ones, thus propagating the worm.

Impact Assessment

This type of attack has a significant cascading impact. By compromising developer accounts, attackers can inject malicious code into legitimate software projects that are, in turn, used by thousands of other applications and organizations. This erodes the 'transitive trust' that underpins the entire open-source ecosystem. The theft of CI/CD tokens and other credentials can lead to more severe breaches, including unauthorized access to source code repositories, build environments, and production systems. The financial motivation of TeamPCP suggests the stolen credentials and access are likely sold to other cybercriminals or used for further attacks.

IOCs — Directly from Articles

No specific Indicators of Compromise (IOCs) were mentioned in the source articles.

Cyber Observables — Hunting Hints

Developers and security teams can hunt for signs of this activity:

Type
file_name
Value
*-setup.pth
Description
The malicious path configuration file used by the Hades worm for persistence.
Context
Search Python site-packages directories (.../site-packages/) for any .pth files containing executable code.
Type
process_name
Value
bun.exe
Description
The Bun JavaScript runtime, which is fetched and used by the malware. Its presence may be anomalous in some environments.
Context
EDR process creation logs.
Type
network_traffic_pattern
Value
Outbound connections from Python processes to raw.githubusercontent.com or api.github.com
Description
The malware may fetch payloads from or exfiltrate data to GitHub.
Context
EDR network logs, proxy logs.
Type
file_path
Value
~/.npmrc, ~/.git-credentials
Description
Common locations for storing developer credentials that are targeted by the malware.
Context
Monitor for unexpected read access to these files by Python or Node.js processes using File Integrity Monitoring (FIM).

Detection & Response

  • Dependency Scanning: Use automated tools to scan project dependencies for known malicious packages and vulnerabilities. Tools like Socket.dev, Snyk, or Dependabot can help identify compromised components.
  • Behavioral Monitoring in CI/CD: Monitor build environments for anomalous behavior, such as unexpected network connections to external sites, attempts to read credential files, or the execution of unknown processes (D3-PA: Process Analysis).
  • Code Review: When adding new dependencies, perform a basic review of the package's health, including its download statistics, age, and whether it has a known author or organization behind it.

Mitigation

  • MFA on Developer Accounts: Enforce MFA on all developer accounts, especially for package repositories like npm and PyPI, and source code management systems like GitHub. This is the single most effective control against credential abuse (M1032 - Multi-factor Authentication).
  • Use Lockfiles: Use package-lock.json (npm) or poetry.lock/Pipfile.lock (Python) to pin dependencies to specific, vetted versions. This prevents the automatic installation of a newly published malicious version.
  • Scope-Limited Tokens: When generating access tokens for CI/CD pipelines, grant them the narrowest possible permissions and set short expiration times.
  • Vet Dependencies: Before incorporating a new open-source package, conduct due diligence. Check for signs of typosquatting, inspect for unusually high permissions in setup scripts, and prefer packages that are well-maintained and widely used.

Timeline of Events

1
July 22, 2026
This article was published

Article Updates

August 11, 2026

TeamPCP launched a major supply chain attack targeting LiteLLM, exposing over 2,500 companies and 434,000 CI/CD pipelines via malicious PyPI packages.

MITRE ATT&CK Mitigations

Enforce MFA on developer accounts for package managers (npm, PyPI) and source code repositories (GitHub) to prevent takeover.

Mapped D3FEND Techniques:

While not universally adopted in these ecosystems, using and verifying package signatures where available can provide an additional layer of trust.

Mapped D3FEND Techniques:

Regularly audit dependencies and monitor CI/CD pipelines for anomalous behavior like unexpected network calls or file access.

Mapped D3FEND Techniques:

Sources & References(when first published)

Article Author

Jason Gomes

Jason Gomes

• Cybersecurity Practitioner

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.

Threat Intelligence & AnalysisSecurity Orchestration (SOAR/XSOAR)Incident Response & Digital ForensicsSecurity Operations Center (SOC)SIEM & Security AnalyticsCyber Fusion & Threat SharingSecurity Automation & IntegrationManaged Detection & Response (MDR)

Editorial Standards & Analyst Review

CyberNetSec.io uses automation to assist source monitoring, deduplication, observable extraction, and structured intelligence generation. Published analysis follows human-defined editorial standards and adds defensive context including MITRE ATT&CK, D3FEND, STIX, and Sigma where applicable. Read our editorial policy.

Tags

Supply Chain AttackMiasmaHadesnpmPyPITeamPCPMalware

📢 Share This Article

Help others stay informed about cybersecurity threats

🎯 MITRE ATT&CK Mapped

Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.

🧠 Enriched & Analyzed

Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.

🛡️ Actionable Guidance

Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.

🔗 STIX Visualizer

Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.

Sigma Generator

Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.