Hackers Compromise Microsoft Agent Framework PyPI Package
┌─ microsoft-agent-framework-pypi-package-compromised.md :: hero
Attackers compromised Microsoft's official Agent Framework Python package on PyPI on November 17, 2026, publishing two malicious releases, 1.26.1 and 1.26.2, to steal developer cloud credentials and sensitive secrets. Microsoft Agent Framework is a fairly popular open-source AI toolkit with roughly 200,000 monthly PyPI downloads, making it relevant to Malaysian developers and organisations building Python AI workflows. Because the malware executed automatically at Python startup even when the package was not imported, any environment that installed these releases risks immediate credential and token exposure.
Key Facts
| Attribute | Value |
|---|---|
| Affected product and versions | Microsoft Agent Framework (PyPI), versions 1.26.1 and 1.26.2 |
| Disclosure date | November 18, 2026 (malicious releases published November 17, 2026) |
How Did the Compromised Packages Steal Credentials?
Versions 1.26.1 and 1.26.2 contained a credential stealer that executed automatically during normal Python startup, even when Microsoft Agent Framework was not imported. Both releases retained their dependency on legitimate agent-framework-core 1.26.0, allowing applications to run normally while harvesting cloud secrets and exfiltrating them to an attacker-controlled webhook endpoint.
Security firms Socket, Step Security, and Ox Security documented the attack. Version 1.26.1 used agent_framework_meta.pth to run agent_framework_meta/_telemetry.py at startup, collecting secrets from environment variables, local configuration files, and other running processes where permissions allowed. It targeted credentials for Azure, AWS, GitHub, Docker, Hugging Face, OpenAI, and other services, while attempting to obtain Azure managed identity access tokens and Azure DevOps OIDC tokens. Version 1.26.2 restored the original package initialiser, moved the malicious code into af_runtime_diag.pth and af_runtime_diag.py, and added GitHub Actions OIDC token requests and searches of GitHub runner directories. Indicators of compromise, including the specific exfiltration endpoint, are published in the original report.
Both malicious versions ran silently on Python startup via .pth files while keeping the legitimate agent-framework-core 1.26.0 dependency intact.
How Were the Malicious Releases Discovered and Removed?
PyPI quarantined version 1.26.1 after its November 17, 2026 publication, but the attacker uploaded version 1.26.2 roughly 2.5 minutes later. PyPI quarantined that second release about eight minutes afterwards. Publishing a second package after the initial quarantine indicates the attacker still held publishing access to Microsoft's PyPI project.
How the attacker gained permission to publish malicious updates under Microsoft's official PyPI project remains unclear. BleepingComputer contacted Microsoft to establish the point of breach, though no response had been received by the time of publication on November 18, 2026. No threat actor has been named or attributed in the report.
Although PyPI quarantined both releases on November 17, 2026, the root cause of the PyPI publishing breach remains unconfirmed.
What Should You Do?
- Isolate any environment where Microsoft Agent Framework version 1.26.1 or 1.26.2 was installed, and avoid running Python or pip until the system is secured.
- Rebuild affected environments from a known-clean state using the safe 1.26.0 release.
- Immediately rotate all credentials, tokens, and secrets reachable from affected environments, including Azure, AWS, GitHub, Docker, Hugging Face, and OpenAI credentials.
- Inspect egress logs for the specific webhook URL path documented in the original report, distinguishing blocked connections from completed transfers to determine the extent of compromise.
- Organisations in Malaysia that identify a compromise may report the incident to Cyber999 (MyCERT).
Common Questions
Am I affected if I never imported Microsoft Agent Framework?
Yes, if version 1.26.1 or 1.26.2 was installed in your environment. Both malicious releases used .pth files to execute the credential stealer automatically during normal Python startup, even when the Agent Framework package was not imported.
Which versions are affected and which release is safe?
Malicious code was found in versions 1.26.1 and 1.26.2, both published on November 17, 2026 and later quarantined by PyPI. Developers should avoid those releases and rebuild from a known-clean environment using the safe 1.26.0 release.
Do we know how Microsoft's PyPI account was breached?
No. The point of breach remains unclear, and BleepingComputer reported that Microsoft had not responded to questions by publication time on November 18, 2026. The attack was documented by security firms Socket, Step Security, and Ox Security.
Sources and Methodology
This dispatch is based solely on the BleepingComputer report published on November 18, 2026. No other documents, advisories, or vendor pages were reviewed or verified.
$ ls ./tags
- #Security