Malware · 4 min read
Two fake releases of Microsoft’s Agent Framework on PyPI stole cloud credentials for about an hour
agent-framework 1.26.1 and 1.26.2 ran a stealer every time Python started. Both are gone from PyPI. If you installed either, pin 1.26.0 and rotate secrets from a clean machine.

On November 17, 2026, someone published two malicious versions of agent-framework, the Python package for Microsoft Agent Framework, an open-source toolkit for building AI agents. Versions 1.26.1 and 1.26.2 carried a credential stealer aimed at Azure, Azure DevOps and GitHub Actions. Both were taken off PyPI within about an hour, according to Wiz, one of several security companies that analysed them.
This matters mostly to developers and teams that build with Python. If you did not install agent-framework 1.26.1 or 1.26.2 on November 17, this did not reach you.
Timeline
All times are UTC, from Wiz’s write-up:
- November 12, 18:25: legitimate version 1.26.0 is published, as usual alongside
agent-framework-core1.26.0. - November 17, 20:35: malicious 1.26.1 is published.
- About 21:08: malicious 1.26.2 is published, 33 minutes later.
- About 21:30: neither version is available on PyPI any more.
The Hacker News reports that the package gets about 190,000 downloads a month, and lists Aikido, Chainguard, Endor Labs, OX Security, SafeDep, Socket and StepSecurity among the other companies that reported on it.
How the attacker got in is not known yet
Wiz says the root cause has not been confirmed. What it can see: there is no 1.26.1 tag or release in Microsoft’s GitHub repository, the main branch does not contain the malicious code, and 1.26.1 was a wheel only, while real releases publish a wheel and a source package together. That suggests the malicious version was built outside the project’s normal release process and uploaded straight to PyPI.
Earlier this year, another Microsoft Python package, durabletask, was compromised after its PyPI token was stolen. Wiz says it has not linked the two incidents.
What the stealer did
Both versions dropped a .pth file into site-packages. Python runs those files every time the interpreter starts, so the stealer ran on any Python launch in that environment, including pip itself, even if nothing ever imported Agent Framework. The file names were made to look like telemetry: agent_framework_meta.pth in 1.26.1 and af_runtime_diag.pth in 1.26.2.
According to Wiz, it collected:
- environment variables whose names contain words like TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB or OPENAI, and secret-looking values from other running processes
- credential files: Azure CLI sessions,
.npmrc,pip.conf,.netrc,.git-credentials, Docker config, Hugging Face tokens, Azure DevOps agent credentials, and.envand JSON files under/appand/workspace - fresh tokens it requested itself: Azure DevOps OIDC tokens, and Azure managed-identity tokens for services such as Key Vault, Storage and Graph
- in 1.26.2 only: GitHub Actions OIDC tokens that can be exchanged for Azure access when a workflow is trusted that way
Everything was compressed, encoded and sent in one HTTPS request to a webhook.site address. Wiz says the attacker used a free-tier address, which accepts at most 100 requests and expires after seven days, and that at most 50 requests were captured. Those can still contain working credentials.
SafeDep, quoted by The Hacker News, points out the catch: "Besides reading credentials already on disk, the code asks the platform to issue new ones. Rotating stored secrets does not cover those." Wiz says stolen managed-identity and OIDC-exchanged tokens stay valid for up to 24 hours.
What to do if you might be affected
- Search for the bad versions. Check lockfiles, CI logs, virtual environments and container images for
agent-framework1.26.1 or 1.26.2. Pin to 1.26.0. - Look for the hook files in
site-packages:agent_framework_meta.pthandagent_framework_meta/_telemetry.py(1.26.1), oraf_runtime_diag.pthandaf_runtime_diag.py(1.26.2). If they are there, assume every Python process in that environment ran the stealer. - Rebuild from a clean environment. Do not trust
pip uninstallalone on an affected machine, sincepipitself starts Python. - Rotate everything that was reachable, from a clean system: environment secrets, Azure CLI sessions, Azure DevOps tokens and service connections, npm, PyPI, NuGet, Docker and Hugging Face tokens, and git credentials.
- Audit Azure identities. Review sign-in and activity logs for managed identities and federated credentials reachable from affected VMs, App Services, AKS nodes or pipelines.
- For GitHub Actions workflows that installed 1.26.2 with
id-token: write, review the Entra ID federated credentials that trust those workflows.
How Frame helps
This is a poisoned developer package, not a breach of personal data, so there is nothing to look up for it. Frame can also look up your verified emails in Have I Been Pwned’s breach database whenever you want to check what has leaked. Frame does not scan your code or your build systems.
Related coverage
- A malicious LiteLLM release stole credentials for about two hours: the same trick, a
.pthfile that runs on every Python start, in another popular AI library last month. - Stolen GitHub accounts pushed a secret stealer into thousands of repositories: why build pipelines are such a valuable target.
Sources
- Wiz, Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines, November 17, 2026
- The Hacker News, Attackers Compromise Microsoft’s Agent Framework PyPI Package to Steal Cloud Credentials, November 18, 2026
More stories
- MalwareSpies behind EggStreme rebuilt their malware within weeks of being exposed, Bitdefender says · 4 min read
- MalwareA leftover attacker server held a million stolen card records from more than 700 payment terminals · 4 min read
- MalwareUkraine and the FBI arrest four suspects in a ransomware ring that used AI voice calls as IT support · 5 min read
New posts, by email.
About once a month. Plain-language privacy notes, nothing else. I never share your address.


