With 192,534 monthly downloads on the Python Package Index, Microsoft’s official agent-framework package was compromised on Tuesday when two successive updates carried a hidden credential-stealing payload.
Agent Framework is an open-source toolkit designed for building artificial intelligence agents and orchestrating them in workflows. Supply chain security companies StepSecurity, OX Security, and Socket detected the malicious updates. The packages are maintained as a meta-package for the underlying technology, according to The Hacker News. Aikido, Chainguard, Endor Labs, SafeDep, and Google-owned Wiz also reported on the incident.
The malicious distributions were published 33 minutes apart on November 17, 2026. Version 1.26.1 appeared at 20:35 UTC, followed by version 1.26.2 at 21:08 UTC, as wiz.io reported.
Microsoft’s agent-framework 1.26.1 and 1.26.2 on PyPI were compromised. A .pth hook runs a credential stealer. Steals: env vars, cloud/CI creds and sends them to webhook[.]site. pic.twitter.com/pu4sfgazNz
Both versions kept their dependency on the genuine agent-framework-core 1.26.0 release. This ensured that applications functioned normally while the background payload executed, according to SecurityWeek.
Startup Hooks and Exfiltration
The malicious payload installed itself as a startup hook, executing during Python initialization without requiring the framework to be imported. Version 1.26.1 used agent_framework_meta.pth, while version 1.26.2 moved the hook into af_runtime_diag.pth to evade detection.

The stealer collected environment variables containing strings such as TOKEN, SECRET, AZURE, AWS, and GITHUB, alongside PASSWORD, KEY, OPENAI, HF_, FOUNDRY, NPM, PIP, NUGET, SYSTEM, BUILD, and AGENT. It also read environments from up to 300 other processes and harvested local configuration files for Docker, npm, pip, Git, and Hugging Face, as CyberSecurityNews detailed.
The stealer targeted Azure and Azure DevOps, collecting up to 60 credential files including Azure CLI data, .netrc, .git-credentials, Azure DevOps agent .credentials.env and JSON files under /app and /workspace, and Azure DevOps OIDC. It also pulled instance metadata from the local IP address 169.254.169.254.
The stealer forks into a detached session or falls back to a daemon thread where fork is unavailable, setting _AF_TEL=1 to avoid running again in child processes, while using file and function names designed to look like legitimate SDK telemetry.
Wiz researchers observed that the destination used the service’s free tier and captured no more than 50 requests. Twenty-nine of the requests appeared linked to sandbox environments, vendor scanning, and tests, while the remaining seventeen requests represented only three unique, successful cases of exfiltration of victim data.
Unresolved Publishing Access
PyPI quarantined both malicious releases by 21:30 UTC on November 17, 2026. However, the attacker uploaded version 1.26.2 after version 1.26.1 was already quarantined, demonstrating continued publishing access.
Two malicious releases of Microsoft Agent Framework's PyPI package, agent-framework 1.26.1 and 1.26.2, were published 33 minutes apart on Nov 17 and carried a credential stealer, per Aikido and Endor Labs analysis. A .pth startup hook runs it whenever Python starts in the… pic.twitter.com/qewl1Qc3rI
None of the security reports explained how the attacker obtained publishing rights under the legitimate Microsoft-associated publisher. SafeDep identified a PyPI maintainer account named vibiret, created on the day of the attack, but its involvement was not confirmed by SecurityWeek.
StepSecurity advised developers who installed either version to isolate affected hosts and runners before running Python or pip again, rebuild from a clean base, and pin agent-framework to version 1.26.0.

Frequently Asked Questions
Which versions of agent-framework contained the credential stealer?
“On November 17, 2026, versions 1.26.1 and 1.26.2 of the official Microsoft agent-framework package on PyPI were published carrying a credential-stealing payload.” StepSecurity wrote.
How did the malicious code execute on developer systems?
The package dropped a .pth startup hook into site-packages, causing Python to run the credential-stealer automatically upon interpreter startup without requiring users to import the framework.
Microsoft's official agent-framework package on PyPI was hijacked with a credential stealer. Here's what you need to know. Versions 1.26.1 and 1.26.2 of the Python package agent-framework, the Python package for Microsoft Agent Framework, were malicious. A .pth startup hook runs… https://t.co/0tGoBX2YHw pic.twitter.com/7i5BNp8syS
Where was the harvested developer data sent?
The compressed and encoded payload was exfiltrated via an HTTPS POST request to a webhook.site endpoint.
Founded in 1975 by Bill Gates and Paul Allen to sell BASIC interpreters for the Altair 8800, Microsoft rose to dominate the PC operating system market with MS-DOS and later Windows, becoming the world’s largest software company by revenue. Under chief executive Satya Nadella, appointed in 2014, the company pivoted toward cloud computing, building the Azure platform that now underpins much of the AI agent ecosystem targeted in this supply-chain attack.
What is the latest safe version of the package?
Agent-framework 1.26.0 is the last clean release, and security firms recommend pinning installations to this version.
Worth a look