Malicious Microsoft agent-framework releases on PyPI steal credentials
On Nov 17, 2026, agent-framework 1.26.1 and 1.26.2 were published to PyPI with a credential stealer that runs whenever Python starts. Both were pulled; 1.26.0 is the last clean release. Microsoft says it is investigating.
- Affected organization
- Microsoft (paquete agent-framework / Microsoft Agent Framework en PyPI)
- Incident date
- Published
Newsroom IOTECH · Edited by: Roberto Manzo, Editorial Director
What happened
On November 17, 2026, two versions of the agent-framework package (Microsoft Agent Framework) were published to PyPI with a credential stealer: 1.26.1 (20:35 UTC) and 1.26.2 (21:08 UTC). According to Wiz, both were no longer available on PyPI by about 21:30 UTC, and 1.26.0 is the last clean version.
The releases appeared under the legitimate Microsoft-associated publisher rather than a lookalike name. According to OpenSourceMalware, PyPI quarantined the publisher because unauthorized access was believed to persist: 1.26.2 was uploaded after 1.26.1 had been removed.
What the malware steals (per the GitHub advisory and the Upwind Security report):
- Environment variables and credential files (Azure, GitHub, npm, Docker, Hugging Face,
.envfiles). - Environment variables of other processes on the same host.
- Azure DevOps and GitHub Actions OIDC tokens (the latter only in 1.26.2) and Azure managed-identity tokens.
The data is sent to an attacker-controlled webhook.site address.
Unknown: how many installations of the malicious versions occurred and whether there are confirmed victims. Published download figures cover the package as a whole, not these two versions.
How it happened
Cause reported by third parties; not confirmed by the organization
Cause (reported, not confirmed by Microsoft): the Upwind Security researcher argues the releases were uploaded outside the official publishing pipeline, most likely with a compromised PyPI upload credential. Their evidence: no tag or release exists for these versions in the repository, there is no sdist, and the wheels were repackaged by hand. OpenSourceMalware also considers an account compromise likely. Microsoft has not published a root cause in the sources we reviewed.
Technical mechanism: each wheel adds a .pth file, which Python runs on every interpreter start. The code triggers on installation without the package being imported. It runs in the background, suppresses errors, and, per Upwind's analysis, adds no further persistence and downloads no second stage.
Version 1.26.2 renamed the files and added theft of GitHub Actions OIDC tokens, which points to a planned iteration.
What the affected organization said
On November 17, 2026, a member of Microsoft's repository replied on GitHub issue #10411 that the compromised versions 1.26.1 and 1.26.2 had been pulled from the package feed and that the team was "actively investigating the issue". According to SecurityWeek, this is how Microsoft acknowledged the incident. We found no MSRC bulletin or root-cause statement.
Conclusion · What to do
For: DevSecOps and Software Supply Chain Security (with IT / Cloud Platform)
Search for agent-framework 1.26.1 and 1.26.2 without running Python (Python would trigger the malware) in dependency files, pip/uv and CI caches, internal mirrors, container images and CI runners. Also look for agent_framework_meta.pth, af_runtime_diag.pth and af_runtime_diag.py in site-packages. How to verify: find / \( -name 'agent_framework-1.26.[12]*' -o -name 'agent_framework_meta.pth' -o -name 'af_runtime_diag.p*' \) 2>/dev/null should return nothing on every host and runner, and lockfiles should pin agent-framework==1.26.0. If anything matches, treat that environment as exposed and rotate the credentials reachable from it.
Recommendation by IOTECH
Sources
- [Python]: agent-framework 1.26.1 on PyPI is malicious (credential stealer via .pth) — Issue #10411GitHub (microsoft/agent-framework) · Backs: Upwind Security technical report (timeline, malware behavior, remediation) and a comment from a member of Microsoft's repository confirming the compromised versions were pulled from the feed and an investigation is under way.
- Malicious code in agent-framework (PyPI) — GHSA-764m-3ppc-5m73GitHub Advisory Database · Backs: Affected versions (1.26.1 and 1.26.2), last clean version (1.26.0), publication times, credential-stealing behavior and the recommendation to rotate credentials.
- Official Microsoft agent-framework PyPI package compromisedOpenSourceMalware.com · Backs: Malware analysis, indications that the publishing account was compromised (not typosquatting), PyPI quarantine of the publisher, and indicators of compromise.
- Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI PipelinesWizBacks: Independent timeline: legitimate 1.26.0 on Nov 12, malicious 1.26.1 at 20:35 UTC on Nov 17, 1.26.2 at ~21:08 UTC, both gone by ~21:30 UTC.
- Microsoft Agent Framework Releases Poisoned With Credential StealerSecurityWeekBacks: Independent press coverage; states that Microsoft acknowledged the incident through a maintainer on GitHub and that 1.26.0 remains the latest clean release.
- Microsoft agent-framework PyPI Package CompromisedStepSecurityBacks: Confirms the second malicious release was uploaded after the first was quarantined, indicating the attacker kept publishing access.
Spotted something wrong or outdated? Write to us at editorial@iotech.mx. We review every request and, where it applies, update this case noting the change.
