← 返回列表

Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines

单站 Wiz Blog 作者 Rami McCarthy 发布 Tue, 17 Nov 2026 22:03:37 GMT 入库 2026-11-18T16:28:12

At 20:35 UTC on November 17, 2026, a malicious version (1.26.1) of the agent-framework package (Microsoft Agent Framework) was uploaded to PyPI. A second version, 1.26.2, followed at 21:08 UTC. As of 21:30 UTC, both versions were no longer available on PyPI. The package gets about 41,000 downloads a week.

The most recent safe version is 1.26.0.

When a malicious version is installed, it drops a .pth file into the site-packages root (agent_framework_meta.pth in 1.26.1, af_runtime_diag.pth in 1.26.2). Python runs .pth files on every interpreter start, so the credential stealer runs whenever Python starts in that environment, even if agent-framework is never imported.

The root cause hasn't been confirmed. What we know so far:

This indicates 1.26.1 may have been built outside the project's normal release process and uploaded directly to PyPI.

Earlier this year, another Microsoft Python package, durabletask, was compromised after its PyPI token was stolen. We have not linked the two incidents.

Time Event
2026-11-12 18:25 Legitimate 1.26.0 published (wheel + sdist, alongside agent-framework-core 1.26.0)
2026-11-17 20:35 Malicious 1.26.1 published
2026-11-17 \~21:08 Malicious 1.26.2 published
2026-11-17 \~21:30 1.26.1 & 1.26.2 no longer available on PyPI

agent_framework_meta.pth contains one line: import agent_framework_meta

In 1.26.1, agent_framework_meta/__init__.py then calls _telemetry._start(). The stealer forks into a detached session (os.setsid()), or falls back to a daemon thread where fork isn't available. It sets _AF_TEL=1 to avoid running again in child processes.

The file and function names (_telemetry, "Lightweight runtime diagnostics hook", user-agent af-runtime-diagnostics/1) are made to look like legitimate SDK telemetry.

The stealer is focused on Azure and Azure DevOps. It collects:

Everything is put into one JSON document, zlib-compressed, base64-encoded, and sent in one HTTPS POST to webhook[.]site. The URL is hardcoded and the payload has no fallback channel. Failures are silently ignored and not retried.

1.26.2 was uploaded at 21:08 UTC, 33 minutes after 1.26.1. It is a repacked 1.26.1 that sends to the same webhook.site URL, with these changes:

webhook.site is a public request-inspection service. On its free tier, a URL that isn't attached to an account:

We have confirmed the attackers token was on the free tier, and a maximum of 50 requests were captured. However, those requests can contain working cloud, CI and registry credentials.

Indicator Description Type
https://webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb Exfiltration endpoint (?t=telemetry) Network
af-runtime-diagnostics/1 Exfil User-Agent (1.26.1) Network
runtime-diagnostics/1 Exfil User-Agent (1.26.2) Network
agent_framework_meta.pth Persistence hook in site-packages (1.26.1) Host
agent_framework_meta/_telemetry.py Credential stealer (1.26.1) Host
af_runtime_diag.pth Persistence hook in site-packages (1.26.2) Host
af_runtime_diag.py Credential stealer (1.26.2) Host
_AF_TEL=1 Run-once environment variable Host
0a013e4724c4437cf9b177def1d988113e167539 _telemetry.py (SHA1) Hash
54d885b7d7161c9ed96489c66364c4bfbf635929166843bba10d97d46b5a2e1f af_runtime_diag.py (SHA256) Hash
325e7e9f0ec94e41ad1a1b7a3f18a6b8b5bffece2e2b97b8d3369eb967452f93 af_runtime_diag.pth (SHA256) Hash

File SHA256
agent_framework-1.26.1-py3-none-any.whl d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110
agent_framework-1.26.2-py3-none-any.whl 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9

Wiz customers should refer to the Wiz Threat Intelligence Center advisory on this incident.

For longer-term hardening guidance, see Practical Package Security: The Unofficial Guide.

原文链接:https://www.wiz.io/blog/malicious-version-of-microsofts-agent-framework-published-to-pypi