Overview
For the second time in under two months, official Microsoft-hosted open source packages have been found carrying the Miasma credential-stealing worm. In the most recent incident, 73 packages were flagged as malicious after automated systems on GitHub blocked them. The packages were weaponised to execute a credential-harvesting payload the moment a developer opened them inside an AI coding agent — a deliberate targeting of automated, agentic development workflows. The incident follows a May 2026 compromise of Microsoft’s durabletask Python SDK on PyPI, attributed to the same threat actor, TeamPCP.
Notably, GitHub’s initial public messaging described the removals as “a violation of GitHub’s terms of service” rather than explicitly warning of malicious content, delaying developer awareness and incident response.
Technical Analysis
The Miasma malware is derived from TeamPCP’s Mini Shai-Hulud toolkit, which the group open-sourced. Its primary infection vector exploits the trust model of modern software supply chains rather than any vulnerability in GitHub or npm infrastructure.
The attack chain proceeds as follows:
- Credential compromise: Attackers obtain legitimate Microsoft credentials used for publishing packages, bypassing the repository’s build pipeline entirely.
- OIDC token abuse: A legitimate GitHub OIDC (OpenID Connect) token is requested using the compromised credentials.
- Provenance spoofing: A malicious build is published with valid SLSA (Supply-chain Levels for Software Artifacts) provenance attestation — cryptographically signed metadata that is normally a signal of integrity.
- Payload execution: The 28 KB payload activates when an AI coding agent opens the package, harvesting credentials from AWS, Azure, GCP, Kubernetes, password managers, and over 90 developer tool configurations.
- Lateral movement: The worm spreads through cloud infrastructure to infect additional developer machines.
The exploitation of SLSA provenance is particularly significant: it subverts a control specifically designed to provide supply-chain integrity guarantees, turning a trust signal into a vector for credential legitimisation.
Framework Mapping
- AML.T0010 (ML Supply Chain Compromise): Packages distributed through official Microsoft repositories are poisoned prior to developer consumption, directly targeting AI-assisted development pipelines.
- AML.T0012 (Valid Accounts): Compromised Microsoft publisher credentials enable legitimate-looking package releases that bypass automated defences.
- AML.T0047 (ML-Enabled Product or Service): The trigger condition — opening packages inside AI coding agents — specifically weaponises agentic AI workflows.
- LLM05 (Supply Chain Vulnerabilities): The attack exploits trusted package repositories as an entry point into developer and AI agent environments.
- LLM08 (Excessive Agency): AI coding agents with broad filesystem and network permissions amplify the blast radius when a malicious package is executed.
Impact Assessment
Developers using AI coding agents to consume Microsoft open source packages are at highest risk. Any machine where an affected package was opened by an agent should be treated as fully compromised. Cloud credentials across all major providers, Kubernetes configurations, and secrets stored in password managers are in scope for exfiltration. The worm’s lateral movement capability means initial compromise of a single developer machine can propagate across an entire cloud-connected organisation.
Mitigation & Recommendations
- Assume compromise: Any developer or pipeline that interacted with the 73 flagged packages via an AI agent should initiate full incident response immediately.
- Rotate credentials: Invalidate and rotate all cloud provider credentials, OIDC tokens, and secrets on affected systems.
- Restrict agent permissions: AI coding agents should operate under least-privilege principles with sandboxed execution environments; prevent agents from executing package install hooks without human approval.
- Do not rely solely on SLSA provenance: This attack demonstrates that valid provenance attestation is not sufficient to confirm integrity when upstream credentials are compromised.
- Monitor for lateral movement: Audit cloud access logs for anomalous API calls originating from developer machines.