Malicious Microsoft agent-framework PyPI releases steal Azure and CI credentials
Malicious versions of the Microsoft agent-framework package on PyPI exfiltrate Azure, GitHub, and other cloud credentials from any Python environment where installed.
Security & privacy Wiz Research 17 Nov 2026 Disclosure Real-world evidence
Published as “Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines”
Why it matters
Organizations that installed the compromised package may have had Azure, GitHub, and other cloud credentials stolen, requiring immediate credential rotation and hardening of supply-chain processes.
Summary
The researchers observed two malicious releases (1.26.1 and 1.26.2) of the Microsoft agent-framework package on PyPI that drop .pth files which execute a credential stealer on every Python interpreter start. The stealer harvests environment variables, token files, Azure managed-identity tokens, and other secret files, then sends the data in a compressed, base64-encoded JSON payload to a hard-coded webhook.site URL. The attack was active for less than an hour, with only 50 exfiltration requests captured, but the potential impact includes compromised Azure, GitHub, and CI pipeline credentials. Evidence comes from the package contents, network captures, and telemetry of the PyPI uploads.
What they found 2
- Malicious .pth files provide persistence and trigger the stealer on any Python start.
“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.”
- Only a limited number of exfiltration requests were observed due to the free-tier webhook endpoint.
“We have confirmed the attackers token was on the free tier, and a maximum of 50 requests were captured.”
Caveats 2
- The URL is hardcoded and the payload has no fallback channel. Failures are silently ignored and not retried.
- We have confirmed the attackers token was on the free tier, and a maximum of 50 requests were captured.
What’s new here 4
- First known supply-chain compromise of Microsoft’s agent-framework Python package.
- Persistence via malicious .pth files that run on interpreter start without importing the package.
- Stealer collects a wide range of cloud and CI credentials, including Azure managed-identity and GitHub Actions OIDC tokens.
- Provides concrete detection indicators and mitigation steps for affected environments.
In the news
- —Error processing article same link