Microsoft Agent Framework PyPI package compromised to steal credentials is the short version of a story that should worry anyone running AI or cloud workloads. On November 17, 2026, attackers published two malicious versions of Microsoft's official Agent Framework package on PyPI, the main repository Python developers use to install software. The package is popular, with around 190,000 to 200,000 monthly downloads, and the malicious releases sat live long enough for unpinned installs, CI caches, and container builds to pull them in.
This was not a typo-squat or a lookalike package. It was the real, official Microsoft project, compromised at the publishing level. That distinction matters for how seriously business and IT leaders should treat the incident.
How the Microsoft Agent Framework PyPI package compromised incident unfolded
Versions 1.26.1 and 1.26.2 of agent-framework still depended on the legitimate agent-framework-core 1.26.0 package, so applications kept working normally while malware ran quietly in the background. According to Socket, StepSecurity, Ox Security, Aikido Security, and Endor Labs, the payload executed automatically during Python startup, even in environments that never imported the Agent Framework package directly.
The stealer searched environment variables containing words like TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, and OPENAI. It also read up to 60 credential files, including Azure CLI settings, Git and Docker credentials, npm and pip configuration, Hugging Face tokens, and application .env files, and pulled secrets from as many as 300 other running processes. Beyond stealing existing secrets, it actively requested new Azure managed identity tokens and Azure DevOps OIDC tokens, which can be exchanged for broader cloud access well beyond what was already stored on disk.
PyPI quarantined the first malicious version, but the attacker published a second one about two and a half minutes later using a different file path for the same payload, which suggests continued publishing access even after the first takedown. Both versions sent stolen data to the same webhook.site endpoint. Microsoft has not said publicly how the attacker gained access to publish under its official project, and had not confirmed a root cause at the time these reports were published.
Why the agent-framework compromise matters beyond one package
This incident lands squarely inside the AI developer ecosystem. The target list, OpenAI tokens, Hugging Face credentials, and Azure AI Foundry access, points to attackers specifically chasing the infrastructure behind AI agents and automated build pipelines, not just individual developer laptops. Endor Labs noted the payload reads like it was written for CI runners and Azure workloads first, developer machines second. OpenAI itself was not the target of the breach, but its API tokens were one of several credential types the malware searched for, which shows how far the blast radius of a single compromised package can reach.
It is also not an isolated event. Endor Labs flagged a similar compromise of Microsoft's durabletask Python SDK in May of the same year, though no researcher has linked the two attacks directly. Two incidents in one year involving official Microsoft Python packages is enough to treat this as a pattern worth planning around, not a one-off.
If your team is already experimenting with AI agents inside Odoo or other systems, this is a useful reminder that the AI & ML development stack carries the same supply chain exposure as any other software dependency chain. The convenience of pulling in popular packages does not remove the need to vet what is actually being installed.
The short-window trap
A common reaction to "the malicious version was only live for under an hour" is relief. That reaction is mistaken. Any build that ran during that window, whether a developer's local install, a CI job, a Docker image layer, or a lockfile committed to source control, can carry the malicious code forward indefinitely until someone finds and removes it. A short window limits new infections after the takedown; it does nothing to limit what was already baked into existing artifacts.
What companies should do now
Security firms investigating the Microsoft Agent Framework PyPI package compromised incident converged on a consistent response checklist:
| Action | Why it matters |
|---|---|
| Search for agent_framework_meta.pth, _telemetry.py, af_runtime_diag.pth, af_runtime_diag.py | These are the specific files used by the two malicious versions |
| Check CI images, container layers, and lockfiles, not just live servers | The payload can persist in artifacts built during the exposure window |
| Review egress logs for webhook.site traffic | Confirms whether data actually left the environment versus being blocked |
| Rotate Azure service principal secrets, PATs, and GitHub, npm, PyPI, Docker, Hugging Face, OpenAI tokens | Any credential reachable from an affected host should be assumed compromised |
| Review Azure sign-in logs for unusual managed identity or federated credential use | Detects whether stolen tokens were actually used to access resources |
| Pin dependencies to hash-verified releases | Prevents an unpinned range from silently pulling a future compromised version |
Removing the package does not undo anything that was already sent out, a point several of the researchers made directly. Treat exposure like a breach, not a cleanup task: isolate, rotate, and investigate in that order.
Where this fits into a broader security posture
Supply chain compromises like this one are exactly the kind of risk that generic antivirus or firewall rules do not catch, because the malicious code arrives disguised as a routine dependency update. Reviewing how dependencies are pinned, how CI secrets are scoped, and how outbound traffic from build infrastructure is restricted is the kind of work that belongs in a periodic review, not a one-time fix. If your team has not audited its CI/CD credential exposure in the last year, this incident is a reasonable trigger to do so, and our cybersecurity services team can walk through that scoping exercise with you. Related reading on securing other parts of the stack is in our DevOps services overview, and for a look at how automated access controls can limit blast radius inside your own ERP, see our piece on Odoo access rights and record rules.
One honest limitation worth naming: no amount of internal process guarantees a vendor's own publishing pipeline stays secure. Microsoft has not disclosed how the attacker got in, and until that is known, any team using agent-framework or similar Microsoft Python packages is relying partly on trust rather than verifiable control. Hash-pinning and egress restrictions reduce exposure; they do not eliminate it. Build your monitoring assuming the next compromised package might look just as clean as this one did.



