Incident sheet · /security
- System
- Security & Risk
- Filed
- Read
- 3 min · 641 words
- Severity
- Routine
Malicious PyPI versions of Microsoft's Agent Framework stole Azure and CI credentials
Two hijacked PyPI releases of Microsoft's Agent Framework ran a credential stealer for under an hour on Nov 17, harvesting Azure tokens, CI secrets and OpenAI keys from a package with 192,534 monthly downloads.

Event log
- Malicious versions 1.26.1 and 1.26.2 of Microsoft's Agent Framework hit PyPI on November 17, live from 20:35 to about 21:20 UTC
- The package has 192,534 monthly downloads; the stealer read up to 60 credential files and pulled secrets from up to 300 running processes
- The payload ran on every Python start and requested managed identity tokens for Azure Key Vault, Graph, Storage and AI Foundry
- Second compromise of an official Microsoft Python package in 2025, after May's trojanized durabletask SDK
Two malicious versions of Microsoft's official Agent Framework package on PyPI — 1.26.1 and 1.26.2 — stole Azure tokens, developer secrets and CI/CD credentials for roughly 45 minutes on November 17 before being pulled. The package pulls 192,534 downloads a month, and anyone who installed it unpinned during that window may still be exposed.
That's the hard part: the window closed, but the damage didn't.
"The package is a credential stealer: it harvests environment secrets, cloud and package-manager credentials, and Azure managed identity tokens, then exfiltrates them to an attacker-controlled webhook," OX Security said in a blog post. Aikido Security, Endor Labs and SafeDep published similar analyses.
How did the attack work?
The first bad release went up at 20:35 UTC. Microsoft reverted to the clean 1.26.0, and the attacker responded by pushing 1.26.2 at 21:08 UTC — same payload, different file path. Both versions were gone by about 21:20 UTC.
The payload ran every time Python started, even if no code imported the package. It installed the genuine framework alongside itself, so applications kept working and the compromise was easy to miss.
According to OX, the stealer:
- Collected environment variables containing TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB and OPENAI
- Read up to 60 credential files, including Azure CLI settings, Git and Docker credentials, npm and pip config, Hugging Face tokens, Azure DevOps build agent credentials and .env files
- Pulled secrets from up to 300 running processes
- Requested fresh managed identity tokens for Azure Resource Manager, Microsoft Graph, Key Vault, Storage, Cognitive Services, AI Foundry and Azure DevOps
The code hid in a module named _telemetry.py, disguised as diagnostics, and exfiltrated compressed, encoded JSON to a webhook.site address under the user agent label "af-runtime-diagnostics."
Endor Labs said the payload was written for CI runners and Azure workloads, with developer laptops also in scope. Both malicious versions shipped as wheel files only, without the source package that accompanied the clean release. OX believes the attackers hijacked the process that builds the wheel files; Microsoft has not confirmed how the breach happened and did not respond to a request for comment.
"This attack isn't just a one-off exfiltration attempt, but a planned, live and coordinated effort to reach as many victims as they can, while still being able to bypass blocks and restrictions," OX said.
Why AI pipelines?
The target list — OpenAI and Hugging Face tokens, Azure AI Foundry access — signals an attack aimed at the AI developer ecosystem and the CI pipelines behind it. It's also the second compromise of an official Microsoft Python package this year: in May, Endor Labs detected three trojanized versions of durabletask, the Python SDK for Azure Durable Functions. No researcher has linked the two incidents.
What should security teams do now?
Removing the package isn't enough. "Removing the package stops future runs, but it doesn't undo anything that was already sent," Aikido said.
OX recommends:
- Checking all environments, CI images, caches and lockfiles for either version
- Hunting for
agent_framework_meta.pthandagent_framework_meta/_telemetry.pyon hosts and build agents (1.26.2 usedaf_runtime_diag.pthandaf_runtime_diag.py, per Aikido) - Treating every secret reachable from any affected host as compromised, and rotating Azure service principal secrets, PATs, and GitHub, npm, PyPI, NuGet, Docker, Hugging Face and OpenAI tokens
- Reviewing Azure sign-in and activity logs for managed identity and federated credential use from affected build agents
- Pinning the agent-framework package to a verified Microsoft release with hash checking, and blocking outbound traffic to webhook.site from build infrastructure
Endor Labs warns that container images, CI caches and lockfiles built during the window could still carry the payload. Treat that 45-minute gap as an ongoing incident, not a closed one.
via infoworld.com/feed/ (Source)
More from Olivia Hart
Show full bio
News editor covering money, funding and market shifts around enterprise information technology and the leaders who run at CIO Monitor.
207 articles
The newsroom digest
One email a day with the stories that matter. No noise.
Cross-references
- Microsoft Agent Framework malware steals cloud credentials on PyPI
- 4,837 GitHub accounts hijacked to steal cloud and CI credentials
- Fake GitHub Security Tools Compromise 2,000 Windows Systems
- Railway Breach Cost $740,000 in Fraudulent AI Usage
- Apify Rotates API Tokens, Advises 2FA Resets After Internal Breach