Breaking
Microsoft Agent Framework PyPI Package Compromised to Steal Cloud Credentials
Two malicious versions of Microsoft's agent-framework package were published to PyPI on 17 November 2026, installing credential stealers that run on every Python startup via .pth files.

By Elena Rostova, Cybersecurity
3 min read
Microsoft's agent-framework Python package was compromised on PyPI on 17 November 2026, with two malicious versions published 33 minutes apart that install credential stealers running on every Python interpreter start.
What happened
Versions 1.26.1 and 1.26.2 of the agent-framework package appeared on PyPI at approximately 20:35 UTC and 21:08 UTC on 17 November 2026. Both versions were quarantined by PyPI administrators after security researchers including Aikido, Chainguard, Endor Labs, OX Security, SafeDep, Socket, StepSecurity and Google-owned Wiz reported the compromise.
How the [malware](/security/optimizely-supply-chain-attack-hits-178-organisations-including-zoom-bbc-and-cnn) works
Each malicious wheel drops a .pth file into the site-packages directory. Python executes import statements in .pth files on every interpreter startup, so the stealer runs whenever Python launches in an affected environment, even if the package is never explicitly imported.
Version 1.26.1 installs
agent_framework_meta.pth, which importsagent_framework_metato launch the payloadVersion 1.26.2 installs
af_runtime_diag.pth, which imports a new top-level moduleaf_runtime_diag.py
The stealer collects:
Environment variables matching credential-related substrings
Credential files: Azure CLI (
~/.azure/*.json),.npmrc,pip.conf,.netrc,.git-credentials,.docker/config.json, Hugging Face tokens, Azure DevOps agent configs,.envand JSON filesAzure DevOps OIDC tokens (
SYSTEM_ACCESSTOKEN,SYSTEM_OIDCREQUESTURI)Azure managed-identity tokens via IMDS (169.254.169.254) and platform-specific endpoints (App Service, Functions)
Azure instance metadata (up to 8,000 characters)
Version 1.26.2 adds GitHub Actions OIDC tokens and expands environment variable search patterns
All collected data is zlib-compressed, Base64-encoded, and sent via HTTPS POST to webhook.site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb.
Impact and remediation
The package attracts approximately 190,000 downloads per month. Security firms advise:
Pin
agent-frameworkto version 1.26.0Isolate affected CI/CD runners and hosts
Rotate all credentials that may have been exposed
Search proxy and DNS logs for requests to the webhook.site endpoint
This is the second Microsoft PyPI supply chain compromise in 2026, following the durabletask attack in May.
Sources
- 1The Hacker Newsthehackernews.com
- 2SafeDep Analysissafedep.io
- 3OX Security Reportox.security