Inter-office memo
- To
- Everyone building with Microsoft Agent Framework
- From
- Mo, Chief Executive
- Date
- November 18, 2026, 9:12 PM CST
- Re
- agent-framework 1.26.1 and 1.26.2
Microsoft’s agent-framework 1.26.1 and 1.26.2 carried a credential stealer. How to check
On November 17, 2026, an attacker published agent-framework 1.26.1 and 1.26.2, the Python package for Microsoft Agent Framework, with a credential stealer that runs whenever Python starts. They were on PyPI from 20:35 to 21:16 UTC. If anything installed either one, treat every secret that machine could reach as stolen, Azure tokens and AI keys included, and pin 1.26.0.
What happened on November 17
On November 17, 2026, two releases of agent-framework, the Python package for Microsoft Agent Framework, went up on PyPI with a credential stealer inside. Microsoft’s overview calls the framework the “direct successor” to Semantic Kernel and AutoGen, “created by the same teams,” and installs it with a plain pip install agent-framework, which takes whatever release is newest. The package gets about 190,000 downloads a month, SecurityWeek reports.
StepSecurity’s timeline, in UTC:
- 20:35:20: 1.26.1 is uploaded.
- 21:06:16: PyPI quarantines it.
- 21:08:39: 1.26.2 is uploaded, “just 2 minutes 23 seconds after the first quarantine.”
- 21:16:44: PyPI quarantines 1.26.2.
That’s 12:35 to 1:16 p.m. Pacific. Quick as it was, automation was quicker: “Automated dependency bots such as Renovate were already opening upgrade pull requests in downstream repositories,” JFrog found. GitHub’s advisory, published November 18, lists both releases as malicious, with no patched version, and says 1.26.0 and earlier aren’t affected. 1.26.0, from November 12, is the newest release on PyPI again. Wiz found no matching release or malicious code in Microsoft’s source repository, SecurityWeek reports, which suggests the files may have been uploaded outside Microsoft’s normal release process.
What the stealer takes
Each release adds a startup file to site-packages: agent_framework_meta.pth in 1.26.1 and af_runtime_diag.pth in 1.26.2. Python runs those whenever it starts in that environment, so the stealer runs at install and with every later python, pip or pytest, whether or not anything imports the package. It slips into the background and sends what it finds, compressed and encoded, in one request to a webhook.site address. From the advisory and Wiz’s analysis:
- Environment variables whose names contain TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB or OPENAI, among others. JFrog notes that it “also captures third-party LLM keys such as ANTHROPIC_API_KEY and GEMINI_API_KEY.”
- Other programs’ environments, read from
/procon Linux. - Credential files: the Azure CLI’s,
.npmrc,pip.conf,.netrc,.git-credentials, Docker’sconfig.json, Hugging Face tokens, Azure DevOps agent credentials and.envfiles. - Fresh Azure tokens, which it requests itself: managed-identity tokens for 12 Azure resources, and Azure DevOps OIDC tokens.
- In 1.26.2 only, GitHub Actions OIDC tokens, in workflows allowed
id-token: write.
1.26.2 also put the package’s own __init__.py back “byte-for-byte,” Socket notes, so checking that file alone misses it.
How much reached the attacker is partly known. Wiz analyzed “the 50 requests that were stored by webhook[.]site’s free tier”: after the attacker’s own tests, sandboxes and security scanners, “The remaining seventeen requests represent only three unique, successful cases of exfiltration of victim data.” That count covers only what webhook.site kept. No one has published how many machines installed either release.
Who it affects
| How you got agent-framework | Affected? |
|---|---|
| An install or upgrade without a pinned version, between 20:35 and 21:16 UTC on November 17 | Yes, if it resolved to 1.26.1 or 1.26.2 |
| A CI run on a dependency bot’s upgrade pull request from that window | Yes |
| A company mirror or package cache that stored the files | Yes, for anything installed from it until they’re removed |
| A container image built in that window | Yes |
| A lockfile or requirements file pinned to 1.26.0 or earlier | No |
agent-framework-core and the other sibling packages |
None reported. StepSecurity saw no uploads after November 12 to -openai, -redis, -postgres, -purview or -tools |
A coding agent counts the same as you. Microsoft’s overview suggests using one: “To build or update a Python Agent Framework solution with GitHub Copilot, Claude Code, Cursor, Codex, or another compatible coding agent, install the Microsoft-maintained agent-framework-builder-python skill.” An agent that installed or upgraded the package in the window got the bad release. Look through November 17’s sessions for 1.26.1 or 1.26.2 in the install output.
How to check
-
Search for the versions. Check lockfiles, requirements files, CI logs and image builds since November 17 for agent-framework 1.26.1 or 1.26.2. File names spell it with an underscore, as in
agent_framework-1.26.1-py3-none-any.whl. -
Look for the startup files without starting Python. StepSecurity warns that in an affected environment “interpreter startup can run the hook again,” so search from the shell:
find / \( -name agent_framework_meta.pth -o -name af_runtime_diag.pth -o -name af_runtime_diag.py \) 2>/dev/null -
Check your network logs for
webhook.siteand the pathd381fd80-ec62-42ad-8f5c-d1b15103c9bb. Wiz says a 200 response means the data was accepted, and a 410 or 429 suggests it was turned away. -
Compare hashes if you keep wheels. The advisory gives their SHA-256:
- 1.26.1:
d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110 - 1.26.2:
3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9
- 1.26.1:
Leftover .pyc files alone don’t prove it ran: they “do not indicate whether the payload ran,” JFrog says.
If it ran
-
Contain it first. Take the machine, container or runner off the network, and stop CI jobs that use it. Deleting the startup file doesn’t stop a collector that’s already running, StepSecurity notes, and it advises rebuilding from a clean base.
-
Clean a virtual environment. The stealer sets
_AF_TEL=1so it doesn’t run twice, and JFrog’s cleanup uses that: “Export _AF_TEL=1 first to block both 1.26.1 and 1.26.2.” Its steps:export _AF_TEL=1 PY_BIN=".venv/bin/python" # or python3 for active/system environments "$PY_BIN" -c ' import pathlib, shutil, site dirs = set(site.getsitepackages() + [site.getusersitepackages()]) files = ("agent_framework_meta.pth", "agent_framework_meta/_telemetry.py", "af_runtime_diag.pth", "af_runtime_diag.py") for d in dirs: base = pathlib.Path(d) for f in files: (base / f).unlink(missing_ok=True) shutil.rmtree(base / "agent_framework_meta" / "__pycache__", ignore_errors=True) for pyc in (base / "__pycache__").glob("af_runtime_diag.*.pyc"): pyc.unlink(missing_ok=True) ' "$PY_BIN" -m pip uninstall -y agent-framework "$PY_BIN" -m pip cache remove agent_framework "$PY_BIN" -m pip install --no-cache-dir "agent-framework==1.26.0"With uv, JFrog gives
uv pip uninstall agent-framework && uv cache clean agent-framework, then pin 1.26.0. -
Purge the copies. Remove the bad files from company mirrors and caches, close or redo the dependency bots’ pull requests from November 17, and rebuild images built that day.
-
Replace every secret it could reach: cloud keys and service principals, Azure DevOps personal access tokens and service connections, GitHub, npm, PyPI, Docker and Hugging Face tokens,
.envvalues and AI keys. -
Check Azure and GitHub. Azure tokens it took “have no static secret to rotate and remain valid until expiry, up to 24 hours,” JFrog says, so review sign-in and activity logs for the managed identities and federated credentials it could reach. If a workflow with
id-token: writeinstalled 1.26.2, treat its OIDC tokens as exposed too.
Replacing AI keys
Clean the machine before you set new keys: a key you put back where the stealer still runs goes the same way. Then cancel each old key where it was issued:
| Secret | How to cancel it |
|---|---|
ANTHROPIC_API_KEY |
On the Claude Console’s API keys page, open the key’s menu and choose Delete API key, says Anthropic |
CLAUDE_CODE_OAUTH_TOKEN |
It’s a one-year token from claude setup-token. Logging out of all sessions on claude.ai covers “tokens created with setup-token,” says Anthropic, but “doesn’t affect your API keys” |
OPENAI_API_KEY |
“Rotate your key immediately from the API Keys page,” says OpenAI, and check the Usage page for use that isn’t yours |
| Gemini, Hugging Face and other keys | In each provider’s settings |
None of the analyses list the files where Claude Code or Codex keep their logins among what the stealer reads. If you’d rather replace those too, our LiteLLM memo lists where each is cancelled.
Putting new keys into CI or a .env file is a job many people hand to a coding agent. Don’t paste the key into the conversation: anything you type to an agent goes to your AI provider and is saved with the conversation, as our guide to keeping keys safe explains. In Enjoy, paste it and choose Keep as secret, and the agent can use it by name: Enjoy runs the command with the key set as an environment variable and shows the agent the output with the value hidden (how). That keeps the key out of the conversation. It doesn’t protect a machine that’s still infected, which is one more reason to clean first.
What no one has said yet
- Microsoft’s account. SecurityWeek reports that “Microsoft has acknowledged the incident,” and that an Agent Framework maintainer confirmed in a GitHub discussion that the releases were removed and an investigation was underway. We found no advisory from Microsoft itself by the evening of November 18.
- How the attacker got in. Wiz writes that “The attacker appears to have compromised a client certificate and private key for Microsoft ESRP,” its internal release pipeline, and that a first attempt “from AWS, was rejected by ESRP’s IP filtering” before one from Microsoft-owned addresses got through. “How the credentials were obtained is not yet known,” it says. SafeDep found a PyPI account,
vibiret, that joined on November 17, is listed as a maintainer of agent-framework and can publish five sibling packages; tying it to the uploads is an inference, SafeDep says. - Who did it. Wiz says the attacker’s tooling “identifies itself as Cairn, an open-source AI penetration-testing framework.” It hasn’t tied this to May’s compromise of Microsoft’s
durabletaskpackage, and SafeDep says nothing links the two. - How many machines installed it. No one has published a count.
We’ll update this memo when Microsoft publishes its account.
8.Questions.
Was I affected by the agent-framework compromise?
- Only if something installed agent-framework 1.26.1 or 1.26.2. That means an unpinned install or upgrade between 20:35 and 21:16 UTC on November 17, 2026, a CI run on a dependency bot’s upgrade pull request from that window, or an install from a mirror or cache that kept those files. GitHub’s advisory says 1.26.0 and every earlier release are clean.
Which agent-framework version is safe to use?
- 1.26.0, released November 12, the last clean release and PyPI’s current one again. Pin it exactly. SafeDep also advises locking the whole dependency tree with hashes, and holding off on new releases of agent-framework and five sibling packages until Microsoft confirms they’re clean.
Did it steal my OpenAI or Anthropic API key?
- If it ran where the key was in an environment variable or a .env file, assume so. It takes every variable whose name contains words such as KEY, TOKEN or SECRET, which covers OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY and CLAUDE_CODE_OAUTH_TOKEN. Delete each key at its provider and make a new one. None of the published analyses list Claude Code’s or Codex’s login files among what it reads.
Does it run if I never import agent-framework?
- Yes. Each release adds a .pth startup file, which Python runs every time it starts in that environment, pip and pytest included, whether or not anything imports the package. That’s why StepSecurity warns against running pip show in an affected environment before it’s contained.
Could a coding agent have installed it for me?
- Yes. Microsoft’s own docs suggest building Agent Framework apps with Claude Code, Codex, GitHub Copilot or Cursor, and an agent that installed or upgraded agent-framework in the window got the bad release just as a person would. Look through November 17’s sessions for 1.26.1 or 1.26.2 in the install output.
How did the attacker get Microsoft’s package?
- That isn’t known yet. Wiz says the attacker appears to have used a stolen client certificate and key for ESRP, Microsoft’s internal release pipeline, while SafeDep found a PyPI account created that day listed as a maintainer of the package. SecurityWeek reports that Microsoft has acknowledged the incident, but it hadn’t published an account by November 18.