Microsoft's agent-framework package was hijacked on PyPI to steal cloud and build secrets
Malicious Microsoft agent-framework releases on PyPI stole cloud and CI secrets
Two releases of Microsoft's agent-framework Python package, 1.26.1 and 1.26.2, carried a stealer that ran whenever Python started. It sent cloud, Azure DevOps and GitHub Actions secrets to an outside web address. PyPI removed both on 17 November, but installed copies, caches and build images can still hold them.
What to do this week
Removing the package stops the stealer from running again. It does not undo anything already sent, so the secrets still need replacing.
- Find out whether you have either version.On each machine and build environment, run pip show agent-framework. Search lockfiles, requirements files, CI logs and container images for 1.26.1 or 1.26.2. In the folder where Python keeps installed packages, look for agent_framework_meta.pth or af_runtime_diag.pth.
- Isolate the affected systems, then rebuild on 1.26.0.Take affected machines and runners off your network before running Python on them, since that can start the stealer again. Rebuild from a clean base, pin agent-framework==1.26.0 in your requirements file, and clear pip and CI caches so the bad copies cannot come back.
- Rotate every secret those systems could read.Include cloud keys, Azure service principal secrets, Azure DevOps tokens and service connections, GitHub, npm, PyPI and Hugging Face tokens, Docker registry logins, and anything in .env files. Create the new secrets from a clean computer, not the affected one.
- Check the cloud sign-in logs from 17 November.In Entra ID, Microsoft's login system for Azure, look at sign-ins by the service principals and federated credentials your pipelines use. In GitHub, check the audit log. Look for token use or sign-ins you do not recognise.
- Search your network logs for webhook.site.A hit means a machine tried to send data there. StepSecurity[2] notes that a connection attempt alone does not confirm data was transferred, so treat a hit as a likely leak.
- If someone else runs your build system, ask for written confirmation.Ask your IT provider or developer to confirm each step in writing, including which versions were found and when the secrets were replaced.
What happened
Microsoft's agent-framework package, a Python library for building AI agents, carried a credential stealer on 17 November 2026. Two releases, 1.26.1 and 1.26.2, were published to PyPI, the public site where Python developers download packages. The package is downloaded almost 200,000 times a month. PyPI removed both releases the same evening, but a copy already installed on a laptop, a build server or inside a container image can still run the stealer.
The first bad release, 1.26.1, went up at 20:35 UTC on 17 November, which is 7:35am on 18 November in Sydney. The second, 1.26.2, followed 33 minutes later. Both looked like routine patches. Each added a hidden setup file, called a .pth file, that Python reads every time it starts. The stealer therefore ran whenever Python did, even if no code from the package was used. A normal install or a test run was enough.
- Level
- High Credential theft. PyPI has removed both versions.
- Bad versions
- 1.26.1, uploaded 20:35 UTC on 17 Nov. 1.26.2, uploaded 21:08 UTC on 17 Nov.
- Removed
- 1.26.1 quarantined 21:06 UTC and 1.26.2 quarantined 21:16 UTC on 17 Nov, per StepSecurity.
- Safe version
- 1.26.0, published 12 Nov 2026 at 18:25 UTC.
- Stolen
- Azure, GitHub, Azure DevOps and other CI secrets, cloud login tokens, and .env files.
The stealer started a background process that gathered secrets and sent them, compressed and encoded, to webhook.site. That is a free service that catches web requests, here used as a drop box at an address the attacker controlled. Aikido[1] reports that version 1.26.2 moved the code into a new file and restored the original package file to its clean state, so checking only that file would miss it.
PyPI had quarantined both versions by about 21:30 UTC. StepSecurity[2] notes that 1.26.2 was uploaded about two and a half minutes after the first quarantine, which suggests the attacker still had publishing access at that point.
Reports differ on how the attacker got in, and none of the explanations is confirmed. Wiz[3] says the attacker obtained a certificate and private key that Microsoft's internal release system uses to sign packages. A first attempt from AWS was blocked by an address filter, and a second from Microsoft's own network went through. Aikido says the 1.26.1 package was unpacked, edited by hand and uploaded again with valid publishing credentials. The Register[4] reports that an administrator account on Microsoft's GitHub organisation appears to have been compromised. Microsoft has not explained the access. Its spokesperson told The Register that the company has “made some repositories private while we investigate malicious content.”
The full story2 more sections
What it steals
The stealer searches for anything that looks like a secret. It checks the settings on the machine, and in other running programs, for names that include TOKEN, SECRET, KEY, AZURE, AWS or GITHUB. It also copies login and config files for Azure, npm, pip, Git, Docker, Hugging Face and Azure DevOps build agents, plus any .env files in the app and workspace folders. Those files often hold passwords and keys in plain text.
It then asks Azure and GitHub for fresh login tokens. These are short-lived passes that let a server or build job reach cloud services without a password. Azure managed identity tokens can open the cloud resources a server is already allowed to use. Version 1.26.2 also asked GitHub for a token, which works only in workflows that have permission to request one. Wiz[3] says tokens stolen this way can stay valid for up to 24 hours.
If a build system ran either version, assume it could read every secret that system could reach.
Who is affected
You are affected if any computer, build runner or container that ran Python installed agent-framework 1.26.1 or 1.26.2. That covers a developer laptop, a GitHub Actions or Azure DevOps runner, a shared build machine, and any container image built since 17 November. The reports name only these two versions. BleepingComputer[5] says agent-framework-core, a separate package the malicious release depends on, was not compromised.
Timeline
-
HARD publishes its article, at High.
References7
- ^ Aikido (). “Two malicious agent-framework releases hit PyPI in 33 minutes”. Publish times 20:35 and 33 minutes apart, the .pth payload, targeted secrets, 1.26.2 restructuring, the upload method, and 1.26.0 as the pin.
- ^ StepSecurity (). “Microsoft agent-framework PyPI Package Compromised”. Quarantine times, the 1.26.2 upload after the first quarantine, file names for the .pth hooks, and the webhook.site connection caveat.
- ^ Wiz (). “Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines”. Timeline in UTC, 1.26.0 published 12 Nov as the last safe release, the reported ESRP certificate route, token validity of up to 24 hours, and remediation steps.
- ^ The Register (). “Microsoft's official Python agent framework hijacked to distribute malware”. Report that a GitHub organisation admin account appears compromised (unconfirmed), OX Security's report on the official publisher account, and a Microsoft spokesperson statement.
- ^ BleepingComputer (). “Microsoft's Agent Framework PyPI package compromised to steal credentials”. Downloads per month, agent-framework-core 1.26.0 not compromised, and no Microsoft response at publication.
- Socket (). “Microsoft's agent-framework PyPI package Compromised with Credential Stealer”. Confirms the .pth startup hooks and the affected versions. Does not name a safe version.
- The Hacker News (). “Attackers Compromise Microsoft's Agent Framework PyPI Package to Steal Cloud Credentials”. Feed summary only: the two versions were published 33 minutes apart on 17 November and are designed to run on every Python start. The full article could not be read.
Situation Room articles are updated as events develop: updates are added to the timeline, and never edited away. Follow them by email or RSS.

