Microsoft's agent-framework package on PyPI, the Python distribution of Microsoft Agent Framework, shipped two malicious releases on 17 November 2026: 1.26.1 and 1.26.2. Both contained a startup hook that stole cloud and CI credentials and posted them to an attacker-controlled webhook. If either version was ever installed in a developer machine, CI runner, container image or server, isolate it, rebuild it from a clean base with agent-framework==1.26.0, and rotate every secret it could reach.
Who this is for and what you will have at the end
This guide is for developers, platform engineers and security teams that use Python, especially anyone building AI agents on Azure, GitHub Actions or Azure DevOps. At the end you will have searched your lockfiles, images and hosts for the bad versions, checked network logs for the exfiltration address, contained and rebuilt affected environments, rotated credentials in a sensible order, and tightened package installs so a hijacked release is less likely to reach you.
The facts below come from BleepingComputer, StepSecurity, Socket and SecurityWeek, plus the PyPI project page and the Python documentation. Researchers analyzed the code statically, so their findings show what the code attempts, not confirmed cloud access by the attacker. Each claim is attributed.
What happened
According to StepSecurity, the timeline in UTC was:
| When (17 Nov 2026 unless noted) | Event |
|---|---|
| 12 Nov, 18:24 | Clean 1.26.0 released |
| 20:35 | 1.26.1 uploaded |
| 21:06 | 1.26.1 quarantined |
| 21:08 | 1.26.2 uploaded, about 2 minutes 23 seconds after the first quarantine |
| 21:16 | 1.26.2 quarantined |
BleepingComputer reports roughly 200,000 monthly downloads for the package. Both malicious releases were wheel-only and, per StepSecurity, had no provenance attestation. Both kept a dependency on the legitimate agent-framework-core 1.26.0, so the framework still worked and nothing looked broken.
How the attacker could publish is not established. SecurityWeek reports that the method "remains unknown", that Wiz found no matching release or malicious code in Microsoft's main repository, and that SafeDep identified a PyPI maintainer account named vibiret created on the day of the attack with publishing rights. The involvement of that account in the uploads is not confirmed. The PyPI project page, which we opened on 21 November 2026, lists both microsoft and vibiret as maintainers. Treat any claim about the entry point as unconfirmed until Microsoft or PyPI publishes one.
How the stealer ran
Python's site module processes .pth files in site directories at startup. The Python documentation says lines starting with import in those files are executed, and that executable lines "are always run at Python startup (unless -S is given to disable the site.py module entirely), regardless of whether a particular module is actually going to be used." That is why the malware ran even when no code imported Agent Framework.
| 1.26.1 | 1.26.2 | |
|---|---|---|
| Startup hook | agent_framework_meta.pth | af_runtime_diag.pth |
| Payload | agent_framework_meta/_telemetry.py | af_runtime_diag.py |
Package __init__.py | Eight lines appended | Original restored |
| Added tokens | Azure DevOps OIDC, Azure managed identity | Same, plus GitHub Actions OIDC and runner directories |
The 1.26.2 detail matters: because the legitimate __init__.py was restored, checking only that file misses the compromise. Look for the .pth files.
Per StepSecurity and Socket, the collector gathers:
- host context such as hostname, username and command line;
- environment variables whose names contain strings such as TOKEN, SECRET, KEY, AZURE, AWS, GITHUB and OIDC;
- credential files, including Azure CLI token caches,
.npmrc,.netrc,.git-credentials, Dockerconfig.json, Hugging Face tokens, Azure DevOps agent files and.envfiles; - the environments of other processes through
/proc/*/environon Linux; - fresh tokens requested from the Azure instance metadata service (managed identity) and from Azure DevOps and, in 1.26.2, GitHub Actions OIDC endpoints.
The data is compressed and base64-encoded, not encrypted, and sent in POST requests to a webhook.site address. Socket says the payload does not download or run further code. On Unix the collector forks and detaches, so it can outlive the Python process that started it.
Am I affected?
Do these checks without starting Python or pip in a suspect environment. StepSecurity warns that running them there can re-trigger the hook. Use a clean machine for anything that needs Python.
1. Search manifests and lockfiles
Look for the two versions anywhere you pin dependencies: requirements*.txt, poetry.lock, uv.lock, Pipfile.lock and pyproject.toml.
grep -rnE "agent-framework(==|=| @ )?[\"' ]*1\.26\.[12]" \
--include="*.txt" --include="*.lock" --include="*.toml" .An unpinned pip install agent-framework on 17 November between the upload and quarantine times could also have resolved to a bad version, so lockfiles alone cannot clear a build from that window. Check the build time in your CI logs.
2. Search for the files
On Linux and macOS:
find / \( -name "af_runtime_diag*" -o -name "agent_framework_meta*" \) 2>/dev/nullOn Windows, in PowerShell:
Get-ChildItem -Path C:\ -Recurse -Force -ErrorAction SilentlyContinue |
Where-Object { $_.Name -like 'af_runtime_diag*' -or $_.Name -like 'agent_framework_meta*' } |
Select-Object FullNameAlso look inside container images and caches: pip caches, internal mirrors such as Artifactory or Nexus, and CI dependency caches. A match on any of these file names means the environment ran the stealer or was one python command away from it.
3. Search egress logs
The documented exfiltration address is a webhook.site URL with the path /d381fd80-ec62-42ad-8f5c-d1b15103c9bb and the query ?t=telemetry. The documented user-agent strings are runtime-diagnostics/1 and, for 1.26.1, af-runtime-diagnostics/1. Search proxy, DNS, firewall and EDR logs for them. StepSecurity cautions that a connection to webhook.site alone does not prove data left; compare blocked requests with completed ones.
4. Check what the environment could reach
If you found the package or files, list what that machine or runner could read at the time: environment variables, mounted credential files, an attached Azure managed identity, an Azure DevOps service connection, a GitHub Actions workflow with id-token: write. That list is your rotation scope.
Contain and rebuild
- Isolate affected hosts, containers and runners from the network. Preserve logs and process data using tools that do not run Python.
- Do not rely on
pip uninstall. Removing files does not stop a collector that is already running. StepSecurity advises killing malicious collector processes and rebuilding from a clean base image where possible. - Rebuild images and runners from a known-clean base. Any image layer that contains 1.26.1 or 1.26.2 must be rebuilt.
- Reinstall from the last clean release in the new environment:
pip install "agent-framework==1.26.0"- Block 1.26.1 and 1.26.2 in your internal mirror or package policy so they cannot return from a cache.
Rotate credentials in the right order
Do this from a clean machine, not from the suspect one.
- Identity and cloud first. Revoke or rotate Azure service principal secrets and certificates, AWS access keys, and any tokens for Azure DevOps or GitHub that the environment held. Sign out sessions where the platform allows it.
- CI and registry secrets. Rotate GitHub Actions secrets, Docker registry credentials, npm and pip index tokens, Git credentials and Hugging Face tokens.
- AI service keys. Rotate keys for OpenAI, Azure OpenAI, Anthropic and similar providers that were in environment variables or
.envfiles. - Application secrets in
.envfiles and anything printed in other processes' environments on the same host.
The stealer asked for managed identity and OIDC tokens, which are short-lived. StepSecurity notes that deleting a trust does not necessarily revoke tokens already issued, so review as well as rotate:
- GitHub OIDC trust permissions and Azure federated credentials;
- Azure DevOps service connections;
- managed identity role assignments, trimmed to least privilege.
Then review sign-in, activity and audit logs for the window after the environment ran Python on or after 17 November. Look for unfamiliar token use, new credentials or role assignments, and new federated credentials. A related earlier incident, covered in our wfx-loot guide, shows why persistence checks matter after CI-secret theft.
Harden installs so a hijacked release reaches you less often
- Pin and hash. Use a lockfile with hashes (
pip install --require-hasheswith a hashed requirements file, or your tool's equivalent) so a new upload cannot slip in unnoticed. - Delay new releases. Many package managers and mirrors can hold a version back for a few days; the two bad releases here were quarantined within about 41 minutes of the first upload, so even a short delay helps.
- Review dependency updates as pull requests instead of floating versions in production builds.
- Limit what builds can read. Give CI jobs and runners only the secrets and roles they need, and avoid
id-token: writewhere no cloud login is needed. - Watch egress. Block or alert on traffic to anonymous webhook and paste services from build and server networks.
- Treat provenance as a signal. StepSecurity noted that the malicious wheels had no provenance attestation; the PyPI page also says 1.26.0 had none, so its absence alone is not proof of tampering.
Troubleshooting and common questions
pip list shows 1.26.0 now, but I installed on 17 November. Check when the environment last resolved the package. Rebuilt or replaced installs are fine; an environment that ran 1.26.1 or 1.26.2 before the downgrade may already have run the stealer. Treat it as exposed if it ran Python in that time.
The package files are gone but I never saw alerts. That fits the design: the framework kept working. Absence of errors proves nothing, so rely on lockfile, image, cache and egress checks.
The GitHub repository was unreachable. SecurityWeek reported at the time of writing that the Agent Framework repository could not be reached, and that other Microsoft repositories had also disappeared, with the link between the events unclear. Do not rely on it for fix status; use PyPI and the vendor write-ups listed below.
Checklist
- Search lockfiles, images, caches and mirrors for 1.26.1 and 1.26.2.
- Search hosts for
af_runtime_diag*andagent_framework_meta*files. - Search egress logs for the documented webhook.site path and user-agents.
- Isolate and rebuild any affected environment from a clean base.
- Rotate cloud, CI, registry and AI keys from a clean machine.
- Review OIDC trusts, federated credentials, service connections and managed identity roles.
- Reinstall
agent-framework==1.26.0, hash-pin it and block the bad versions.
See also
- AZ-400 DevOps Engineer Expert Study Guide: Skills Measured and Labs
- LangChain vs Semantic Kernel vs the Plain SDK: When a Framework Pays Off
- GitHub Actions Scheduled Workflows: Cron Syntax, Delays and Limits
What we checked
- Opened the BleepingComputer report on 21 November 2026: affected versions 1.26.1 and 1.26.2, both published 17 November, about 200,000 monthly downloads, and Microsoft had not answered its questions at publication.
- Opened the StepSecurity write-up on 21 November 2026 and copied its UTC timeline, file names, collected data categories, indicators and remediation steps; cross-checked file names and behavior against Socket's analysis, which agrees on
agent_framework_meta.pthandaf_runtime_diag.pth. - Opened the SecurityWeek report on 21 November 2026 for the maintainer's GitHub discussion statement and the unknown publishing method; neither BleepingComputer, StepSecurity nor Socket included a Microsoft statement.
- Opened the PyPI project page on 21 November 2026: 1.26.0 released 12 November 2026, MIT license, maintainers
microsoftandvibiret. - Opened the Python
sitedocumentation on 21 November 2026 and confirmed the quoted wording that executable.pthlines run at startup regardless of whether the module is used. - Checked the timing arithmetic: 21:06:16 to 21:08:39 is 2 minutes 23 seconds, and 20:35:20 to 21:16:44 is 41 minutes 24 seconds from first upload to second quarantine.
- Not checked: we did not install or run the malicious packages, did not verify the hashes ourselves, and did not run the search commands shown here against a real environment; they are standard file and text searches, and the indicators come from the vendors. We could not open the Ox Security post (it returned 403) or the GitHub discussion.
Last tested: 2026-11-21
References
- BleepingComputer: Microsoft's Agent Framework PyPI package compromised to steal credentials
- StepSecurity: Microsoft agent-framework PyPI package compromised
- Socket: agent-framework PyPI package compromised with credential stealer
- SecurityWeek: Microsoft Agent Framework releases poisoned with credential stealer
- PyPI: agent-framework project page
- Python documentation: the site module and .pth files
Comments
Questions and tips are welcome. Comments are checked by the EpiFive team before they appear; please do not share passwords, phone numbers or other private details.