Malicious Microsoft Agent Framework Python Packages (v1.26.1 & v1.26.2) Harvest Cloud and CI/CD Credentials
What Happened — On 17 Nov 2026, two back‑to‑back releases of the open‑source agent‑framework Python package were uploaded to PyPI. The versions, 1.26.1 and 1.26.2, contained hidden .pth startup hooks that execute automatically when the interpreter starts. Unlike a typical code replacement, the malicious code was added alongside the legitimate agent‑framework‑core v1.26.0 dependency, allowing the package to function normally while silently exfiltrating environment variables, Azure credential files, and tokens used by build systems such as GitHub Actions.
Endor Labs, which performed the forensic analysis, logged the first upload at 20:35 UTC and the second at 21:08 UTC. Both packages were removed from PyPI after a GitHub security advisory was published on 18 Nov 2026, but the advisory warns that removal alone does not invalidate any secrets already harvested.
The malicious payload reads a predefined set of environment variables (e.g., AZURE_, AWS_) and credential files stored on developer workstations or CI runners. It then transmits the data to an attacker‑controlled endpoint. The second release further targets GitHub Actions tokens, expanding the potential impact to automated pipelines that often hold privileged service‑account credentials.
No public evidence has emerged that the stolen credentials were actually used to access customer data or cloud resources, but the advisory treats any installation of the affected versions as “exposed.” The advisory recommends treating the environment as compromised, revoking or rotating any credentials that could have been accessed, and rebuilding images from verified dependencies.
Microsoft has not commented on the incident, and the method by which the attackers gained publishing rights on PyPI remains unknown. The episode follows earlier supply‑chain compromises of machine‑learning libraries (e.g., the PyTorch dependency incident) and underscores the persistent risk of third‑party code injection in developer toolchains.
Why It Matters for Trust & Control Assurance — This attack demonstrates how a single compromised third‑party package can bypass traditional code reviews and harvest privileged secrets, highlighting the need for continuous third‑party risk monitoring and immutable evidence of dependency provenance.
Who Is Affected —
- Software development teams building AI or cloud‑native applications.
- Organizations that rely on CI/CD pipelines (GitHub Actions, Azure Pipelines, etc.).
- Cloud service consumers that store long‑lived service‑account tokens on developer machines or build agents.
Recommended Actions —
- Identify every system that installed
agent‑frameworkv1.26.1 or v1.26.2 – search package‑manager logs, CI build histories, and container images. - Isolate the affected environments, preserve logs and artifacts for forensic analysis, and prevent further secret retrieval.
- Rotate all Azure, AWS, and GitHub Actions tokens that could have been accessed; treat them as compromised until revoked.
- Rebuild images and pipelines using only verified, signed packages (e.g., from an internal artifact repository).
- Implement strict package‑signing verification and allow‑list policies in your build systems to block unsigned or newly published versions.
- Audit credential lifetimes and scope; enforce least‑privilege for development and test accounts.
Technical Notes —
- Attack vector: malicious third‑party dependency uploaded to PyPI (supply‑chain).
- Payload delivery:
.pthstartup hook executed automatically on interpreter launch. - Data exfiltrated: environment variables, Azure credential files, GitHub Actions tokens.
- Advisory source: GitHub Security Advisory (Nov 18 2026) and Endor Labs analysis.