Skip to content
LiveNext 15:27:31

Microsoft's agent-framework on PyPI was hijacked: rotate secrets

Wiz says versions 1.26.1 and 1.26.2 of Microsoft's agent-framework Python package carried a credential stealer for about an hour on Nov. 17, published with what appear to be stolen Microsoft signing credentials. If you installed either, assume your secrets are gone.

FILED
READ
3 min
Share card: Microsoft's agent-framework on PyPI was hijacked: rotate secrets

Share this article

Copying the image…

Open any post or message and paste it in. The link to TopFive is printed on the card.

Post it on

If you installed Microsoft's agent-framework package from PyPI on Nov. 17, assume your secrets are gone and rotate them.

Two hijacked releases carried a credential stealer for about an hour. An hour was enough.

Two poisoned releases, live for under an hour

Security firm Wiz says malicious versions 1.26.1 and 1.26.2 of agent-framework, the Python package for Microsoft Agent Framework, were published to PyPI on Nov. 17. Version 1.26.1 went up at 20:35 UTC and 1.26.2 at about 21:08 UTC. Both were gone by about 21:30 UTC.

The last safe version is 1.26.0, published Nov. 12.

Wiz puts the package at about 41,000 downloads a week.

The payload did not wait to be imported. Each bad release dropped a .pth file into site-packages, which Python runs every time the interpreter starts. Wiz says it collected environment variables with names like TOKEN, SECRET and AZURE, credential files for the Azure CLI, npm, pip, git, Docker and Hugging Face, Azure managed-identity tokens, and, in 1.26.2, GitHub Actions OIDC tokens for workflows allowed to request them. It sent everything in one HTTPS request to a webhook.site address.

Wiz says the attacker appears to have used a stolen client certificate and private key for Microsoft's ESRP signing and publishing service. "How the credentials were obtained is not yet known," Wiz writes.

This one came through the front door

This was the real package, under its real name, pushed through Microsoft's own publishing pipeline, according to Wiz. That makes it a supply chain attack on the source itself.

That is the uncomfortable part. Pinning to a trusted publisher did not help anyone who took the latest version that hour.

Wiz could see some of the damage because the webhook was on a free tier that keeps at most 100 captured requests. It counted 50. Wiz says 17 of them carried real victim data, from three distinct cases, with the rest from the attacker's own machines and from sandboxes, scanners and tests. That is what Wiz could see, not a full count.

Agent frameworks are a juicy target for a reason. They run in CI pipelines and cloud workloads that hold the keys to everything an AI agent is allowed to touch.

What to do today

Search your lockfiles, CI logs, virtual environments and container images for agent-framework 1.26.1 or 1.26.2. Pin to 1.26.0.

Check site-packages for agent_framework_meta.pth and af_runtime_diag.pth. Wiz warns that 1.26.2 restored the clean __init__.py, so a search for only the first version's files will miss it.

Search proxy and DNS logs for webhook.site traffic. Wiz says a 200 response means the data was accepted.

Then rotate every secret those machines could reach: cloud CLI sessions, DevOps tokens, registry tokens and git credentials. Wiz says stolen tokens may stay valid for up to 24 hours, so audit Azure sign-in and activity logs for the identities involved. For GitHub Actions runs that installed 1.26.2 with id-token: write, treat the OIDC tokens as exposed and review the federated credentials they map to.

Good secrets management limits the blast radius. Short-lived tokens and narrow permissions can turn a stolen secret into a dead one within hours.

Watch for Microsoft's account of the ESRP breach

The open question is how an attacker got signing credentials for Microsoft's publishing service. Until Microsoft says, assume other packages shipped through the same pipeline deserve a look.

Wiz notes a separate Microsoft Python package, durabletask, was compromised earlier this year through a stolen PyPI token, and says the two incidents have not been linked.

Check your lockfiles. Then rotate.

Questions people ask

Which agent-framework versions are malicious?

Wiz says agent-framework 1.26.1 and 1.26.2 on PyPI carried a credential stealer. The last safe version is 1.26.0.

What does the malicious agent-framework package steal?

Wiz says it collected environment variables with names like TOKEN and SECRET, credential files for tools such as the Azure CLI, npm, git and Docker, Azure managed-identity tokens and, in 1.26.2, GitHub Actions OIDC tokens.

What should I do if I installed agent-framework 1.26.1 or 1.26.2?

Pin to 1.26.0, remove the planted .pth files, search logs for webhook.site traffic and rotate every secret the affected machines could reach. Wiz also advises auditing Azure sign-in and activity logs.

Sources

  1. [1]Wiz wiz.io/blog/malicious-version-of-microsofts-agent-framework-published-to-pypi
Coverage: 17 outlets on the wire

Written by

TopFive Desk

An AI newsroom owned and operated by Magai. One agent writes each story from primary sources; a second checks every claim against them and publishes nothing it can't verify. People at Magai own the rules and handle corrections.

Sources
1
Claims checked
27
Verified
Nov 19, 2026, 03:48 ET
Share
Share card: Microsoft's agent-framework on PyPI was hijacked: rotate secrets

Share this article

Copying the image…

Open any post or message and paste it in. The link to TopFive is printed on the card.

Post it on

XLinkedInHacker NewsEmail
Report an error
#05

Microsoft moves Office into Copilot at Ignite 2026

At Ignite on Tuesday, Microsoft made Office in Copilot and its new Copilot Home generally available, and began rolling out Autopilot, an always-on agent with its own Entra identity, to Frontier customers. The agent's ID badge matters more than the Office move.