Microsoft’s Agent Framework PyPI Package Hijacked to Steal Azure and CI/CD Credentials — 190,000-Download Library Used as a Credential Harvester for 55 Minutes
Two malicious versions of Microsoft’s AI agent-building library appeared on PyPI on November 17 and were removed within 55 minutes — but not before stealing Azure managed-identity tokens, GitHub Actions OIDC tokens, and dozens of credential files from every Python environment that started while they were live. Any CI/CD pipeline or cloud workload that ran pip install agent-framework between 20:35 and 21:30 UTC should be treated as fully compromised.
What: Microsoft’s agent-framework PyPI package — the Python meta-package for building AI agents with the Microsoft Agent Framework, with roughly 190,000 downloads per month — was compromised on November 17, 2026. Two malicious versions (1.26.1 and 1.26.2) used Python’s .pth startup mechanism to run a credential stealer on every interpreter invocation, including during pip install itself. Stolen data was exfiltrated to a webhook.site endpoint.
Status: Both malicious versions have been quarantined by PyPI. The safe version is 1.26.0. No CVE has been assigned. This is not on CISA’s Known Exploited Vulnerabilities catalog.
Deadline: No CISA deadline. The urgency is self-imposed: Azure managed-identity and GitHub Actions OIDC tokens stolen during the exposure window may remain valid for up to 24 hours. Any organization that ran an affected install during the 55-minute window should rotate credentials now, without waiting for a formal deadline.
Fix: Pin all environments to agent-framework==1.26.0 and rebuild. Remove agent_framework_meta.pth, af_runtime_diag.pth, and their associated modules from site-packages. Rotate every cloud credential and service token reachable from affected compute. Audit Azure managed-identity sign-ins and GitHub Actions OIDC federated credential use.
Key takeaways
- The stealer ran whether or not agent-framework was imported. The
.pthfile mechanism executes at every Python interpreter startup — including insidepip install— so an affected environment that never called a single agent-framework function still had credentials exfiltrated. - Version 1.26.2 was designed to defeat file-based detection. It restored the legitimate
__init__.pyand moved the payload toaf_runtime_diag.pthandaf_runtime_diag.py, meaning any check that only inspects__init__.pywill clear the malicious install as safe. - Cloud identity tokens are the highest-value target. The stealer actively requested fresh Azure managed-identity tokens for 12 Azure service resources and, in 1.26.2, GitHub Actions OIDC tokens for the Azure management endpoint. These are more dangerous than static secrets because they bypass MFA and may be valid for hours after theft.
- The exfiltration channel was capped and brief. The attacker used a free-tier webhook.site token capped at 100 requests that expires in 7 days. Researchers confirmed at most 50 inbound requests were captured — but those 50 could contain working Azure and GitHub credentials from real CI/CD pipelines.
- This is the second Microsoft-related PyPI compromise this year. In May 2026, the TeamPCP group was linked to malicious versions of Microsoft’s
durabletaskpackage as part of the broader LiteLLM supply chain breach. - Attribution is unknown. No threat actor or group has been named. How the attacker obtained publishing access to the package has not been confirmed publicly.
Executive Summary
A trusted developer tool became a credential harvester for 55 minutes yesterday — and your CI/CD pipeline may have installed it during that window.
At 20:35 UTC on November 17, 2026, an attacker published agent-framework 1.26.1 to PyPI. Thirty-three minutes later they published 1.26.2, with an improved evasion design. Both versions were quarantined by roughly 21:30 UTC. The window was narrow — but Microsoft’s AI agent-building library receives roughly 41,000 downloads per week. Any automated dependency resolution, nightly build, Docker image rebuild, or fresh developer workstation setup that touched PyPI during those 55 minutes is in scope.
The stealer’s mechanism is unusually aggressive. Rather than waiting for the package to be called, both versions used Python’s .pth file startup hook to execute the payload at every interpreter invocation. That means the credential harvester ran when developers typed pip install, when CI runners set up their virtual environments, and when container builds pulled dependencies. No explicit import was necessary. No function had to be called.
What the stealer sent back covers the full surface of a modern cloud development environment: Azure CLI configuration, managed-identity tokens for 12 Azure service resources, GitHub Actions OIDC tokens that can be exchanged for Azure access tokens, Azure DevOps service connection credentials, npm, pip, Docker Hub, Hugging Face, and Git credentials, and any environment variable whose name contains a string like TOKEN, SECRET, KEY, AZURE, AWS, GITHUB, or OPENAI. All of this was compressed, encoded, and posted to a single HTTPS endpoint in one shot.
The safe version — 1.26.0, published November 12 — remains on PyPI. Organizations should pin to it, rebuild affected environments, check site-packages for the malicious .pth files, and rotate every cloud credential that could have been present on any host that ran Python between 20:35 and 21:30 UTC yesterday.
Why This Matters to CISOs and Security Leaders
Your software factory is the attack surface, not your software. This incident did not exploit a code-execution vulnerability or bypass a firewall. It hijacked the dependency installation step that every engineering team runs dozens of times a day. If your team builds software in Python and uses anything from Microsoft’s AI agent ecosystem, an automated process probably pulled these packages without anyone deciding to.
Cloud identity tokens are not passwords — they are harder to control. Static secrets can be rotated in minutes once discovered. Azure managed-identity tokens and GitHub Actions OIDC tokens are dynamic: they are issued fresh on demand, they carry platform-level trust, and they bypass MFA by design because the credential is a service identity rather than a human one. If the stealer requested a managed-identity token from an affected CI runner, that token was valid when exfiltrated and may still be valid now. The rotation step here is not changing a password; it is revoking federated credentials and reviewing every sign-in for the affected service principals.
The 1.26.2 evasion is a signal, not noise. The fact that the attacker published a second version — 33 minutes after the first — that restored the legitimate __init__.py while keeping the payload hidden in a different file shows deliberate anti-detection planning. The attacker knew how defenders check Python packages. Organizations whose detection playbook only inspects __init__.py would have cleared the 1.26.2 install as safe.
The question to ask your DevSecOps team today is not “did we install these versions?” It is: “what did our CI/CD pipelines install between 20:35 and 21:30 UTC yesterday, and do we have an audit trail?” If you do not have per-build dependency logs that go back 24 hours, you cannot answer that question — and that is the gap to close, independent of this incident.
The Timeline
| Date / Time (UTC) | What happened |
|---|---|
| Nov 12, 18:25 UTC | Legitimate agent-framework 1.26.0 published by Microsoft, with matching agent-framework-core 1.26.0 |
| Nov 17, 20:35 UTC | Malicious version 1.26.1 published to PyPI. Drops agent_framework_meta.pth; payload is a detached credential stealer mimicking SDK telemetry. Upload is wheel-only — no sdist, no matching core package |
| Nov 17, 21:08 UTC | Malicious version 1.26.2 published, 33 minutes after 1.26.1. Restores legitimate __init__.py to evade file-based detection; payload moves to af_runtime_diag.pth and af_runtime_diag.py. Adds GitHub Actions OIDC token collection and targets additional Azure runner paths |
| Nov 17, ~21:30 UTC | Both versions quarantined by PyPI. Exposure window closes — roughly 55 minutes total |
| Nov 18, 2026 | Analysis published by Aikido, Endor Labs, OX Security, SafeDep, Socket, StepSecurity, and Wiz. No CVE assigned. Attribution unknown |
The payload ran when the developer typed
pip install— before a single line of agent-framework code was ever called.
Attack Chain Analysis
| Stage | Technique | Control to apply |
|---|---|---|
| Initial access | Attacker uploads malicious versions of a legitimate, high-download Microsoft PyPI package. Exact access method (stolen token, compromised maintainer account, compromised publishing pipeline) is unknown | Require SLSA provenance or Sigstore signatures for all third-party packages; alert on new releases of pinned dependencies within the first 24 hours |
| Execution on install | .pth file dropped into site-packages executes at every Python interpreter startup — including during pip install — without any import or function call |
Monitor site-packages for unexpected .pth file additions; run installs in isolated, ephemeral build environments, never on production hosts |
| Credential harvesting | Payload scans environment variables for TOKEN, SECRET, KEY, AZURE, AWS, GITHUB, OPENAI patterns; reads up to 80 credential files; inspects up to 300 other processes’ environments via /proc/*/environ |
Restrict environment variable access in CI runners; use short-lived credentials and avoid storing long-lived secrets in runner environments |
| Cloud identity theft | Stealer actively requests fresh Azure managed-identity tokens (IMDS) for 12 Azure service resources and Azure DevOps OIDC tokens; v1.26.2 also requests GitHub Actions OIDC tokens for the Azure management endpoint | Apply IP-based conditional access to managed-identity token issuance; monitor for IMDS calls from unexpected processes; rotate federated credentials immediately if affected |
| Exfiltration | All stolen data is zlib-compressed, Base64-encoded, and POSTed in a single HTTPS request to a hardcoded webhook.site URL. No retry, no fallback channel. User-Agent: af-runtime-diagnostics/1 or runtime-diagnostics/1 |
Block outbound HTTPS to webhook.site; monitor egress for the User-Agent strings above and for requests to free-tier webhook or pastebin services from build infrastructure |
| Persistence | .pth file remains in site-packages after installation; payload re-executes on every subsequent Python invocation in the environment. No separate persistence mechanism deployed |
Rebuild affected environments from scratch rather than removing the files; a clean reinstall is the only reliable remediation |
The free-tier webhook.site cap is being cited as a reason for limited damage. It is not. The 100-request cap on the exfiltration endpoint means the attacker could have received credentials from up to 100 environments during the window. At 41,000 weekly downloads, some of those 100 almost certainly came from real production CI/CD pipelines rather than research sandboxes. The attacker chose a free, ephemeral, no-registration endpoint specifically because it leaves almost no forensic trail. The cap does not bound the damage — it bounds what researchers can verify.
Threat Intelligence Breakdown
Attribution: Unknown. No threat actor or group has been named by any of the seven firms that published analysis on November 18. The connection to the May 2026 TeamPCP campaign that targeted Microsoft’s durabletask package (part of the broader LiteLLM supply chain breach) has been noted but not confirmed. How the attacker obtained upload credentials to the agent-framework package has not been disclosed.
What is still unknown: whether the attacker obtained a stolen or leaked PyPI token, compromised the CI/CD pipeline that publishes the package, or used a different vector; the number of real-world environments that executed the payload; whether any of the exfiltrated credentials have been used; and whether the webhook.site logs will be preserved for law enforcement.
Indicators of compromise (sources: Wiz, Socket, Aikido; defanged where applicable):
| Type | Indicator | Context |
|---|---|---|
| File (site-packages) | agent_framework_meta.pth |
Dropped by v1.26.1; loads the credential stealer on every interpreter start |
| File (site-packages) | af_runtime_diag.pth |
Dropped by v1.26.2; loads af_runtime_diag.py on every interpreter start |
| File (site-packages) | af_runtime_diag.py |
Main stealer module in v1.26.2; SHA256: 54d885b7d7161c9ed96489c66364c4bfbf635929166843bba10d97d46b5a2e1f |
| File (site-packages) | agent_framework_meta/_telemetry.py |
Main stealer module in v1.26.1; SHA1: 0a013e4724c4437cf9b177def1d988113e167539 |
| Environment variable | _AF_TEL=1 |
Set by both versions after first execution; prevents re-running in child processes. Presence confirms infection ran |
| Wheel SHA256 (v1.26.1) | d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110 |
Malicious wheel for version 1.26.1 |
| Wheel SHA256 (v1.26.2) | 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9 |
Malicious wheel for version 1.26.2 |
| Network (egress) | webhook[.]site — token: d381fd80-ec62-42ad-8f5c-d1b15103c9bb |
Hardcoded exfiltration endpoint; block at the domain level |
| HTTP User-Agent (v1.26.1) | af-runtime-diagnostics/1 |
Used for the exfiltration POST request |
| HTTP User-Agent (v1.26.2) | runtime-diagnostics/1 |
Used for the exfiltration POST request |
Enterprise Impact
CI/CD pipelines are the primary blast radius. Any pipeline that resolved agent-framework to its latest version between 20:35 and 21:30 UTC on November 17 ran the payload. Pipelines that build Docker images, run automated tests, or deploy to Azure are common users of the Microsoft Agent Framework and are exactly the environments with the richest credential exposure: Azure service principal credentials, managed-identity tokens, GitHub secrets, and deployment keys often live as environment variables in these runners.
Developer workstations are also in scope. Any developer who ran pip install, updated a virtual environment, or pulled a requirements file during the exposure window on a machine that had any of the targeted credential files present — Azure CLI credentials in ~/.azure/, .git-credentials, .netrc, pip.conf — had those files exfiltrated. Developer machines often carry longer-lived credentials than CI runners.
The Azure managed-identity vector deserves separate treatment. Managed identities are often granted broad permissions because they are assumed to be process-level credentials that cannot leave the compute boundary. The IMDS endpoint is accessible from any process running on the Azure VM or container. If the stealer ran on a VM with a managed identity attached, it obtained a token for up to 12 Azure service resources. Those tokens are short-lived but may still be valid, and the managed identity itself may be over-privileged. This warrants a full review of what each affected managed identity can do.
The supply chain risk extends to any package that depends on agent-framework. Downstream packages, internal libraries, or customer-facing applications that list agent-framework as a dependency without pinning the version may have pulled the malicious release without any direct decision to do so. Supply chain graph analysis is warranted for any Python-heavy organization using Microsoft AI tooling.
What Security Leaders Should Do Next
Today
- Identify all affected environments: search dependency lockfiles (
requirements.txt,poetry.lock,Pipfile.lock), CI/CD build logs, container image manifests, and virtual environment site-packages directories foragent-framework==1.26.1oragent-framework==1.26.2. The exposure window is 20:35–21:30 UTC on November 17, 2026. - Check for execution artifacts: look for
agent_framework_meta.pth,af_runtime_diag.pth,af_runtime_diag.py, andagent_framework_meta/_telemetry.pyin site-packages on affected hosts and containers. The presence of the environment variable_AF_TEL=1in any process confirms the payload ran. - Check egress logs immediately: search proxy and DNS logs for outbound requests to
webhook.site, specifically the token endpointd381fd80-ec62-42ad-8f5c-d1b15103c9bb. A 200 response confirms data was accepted. Blockwebhook.siteat the perimeter now if not already blocked. - Rotate cloud credentials on a war-footing timeline: for any confirmed or possible affected environment, rotate Azure CLI sessions and service principal credentials, invalidate Azure DevOps PATs and service connections, rotate GitHub secrets and review OIDC federated credentials tied to affected repositories, and change npm, Docker Hub, Hugging Face, pip, and Git credentials.
- Rebuild affected environments from clean base images. Removing the malicious
.pthfiles in place is not sufficient — rebuild.
Within 48 hours
- Audit Azure managed-identity activity: for every managed identity reachable from affected compute, review Azure AD sign-in logs and Azure Monitor activity logs for the exposure window. Look for resource access that does not match normal application behavior — unexpected ARM API calls, Key Vault reads, Container Registry pulls, or storage access.
- Review GitHub Actions OIDC configuration: for any workflow that could have installed 1.26.2 with
id-token: writepermissions, review the Entra ID application registrations linked to those workflows and audit their sign-in logs. Rotate the associated client secrets and consider removing federated credential trusts for affected repositories until they are confirmed clean. - Pin agent-framework to 1.26.0 in all dependency manifests and enforce pinning policy for all third-party packages in production and CI/CD pipelines. Add a build check that alerts on any unpinned package or unexpected version bump for packages in the Microsoft Agent Framework family.
- Scan downstream dependencies: inventory all internal packages and applications that list
agent-frameworkas a dependency without an exact pin, and apply the same exposure check.
Long-term
- Implement dependency integrity verification. Require pip hash verification for all packages (
pip install --require-hashes), or adopt a tool such as pip-audit combined with a private mirror that pins known-good versions. Evaluate adopting SLSA provenance attestations for first-party packages and requiring them from key third-party vendors. - Apply least privilege to managed identities. Treat managed identities as network-connected credentials. Audit each one’s Azure RBAC role assignments and restrict them to the minimum set of permissions the application actually uses.
- Instrument your software supply chain for speed, not just coverage. This incident’s window was 55 minutes. Standard daily security scans would have missed it entirely. Invest in real-time package ingestion monitoring that alerts on new PyPI releases of pinned dependencies within minutes of publication.
- Brief your engineering leadership. The technical staff already know about the Microsoft Agent Framework ecosystem. Confirm that security review is part of the process for adopting any new dependency from that family, and document this incident as a case study for why unpinned dependencies in AI tooling carry supply chain risk.
Get executive threat briefings before they hit the headlines
DataWater’s daily briefing covers the exploited CVEs, confirmed breaches, and supply chain incidents security leaders need to act on — with a plain-English summary of what to do and when.
Winners and Losers
| Better positioned | More exposed |
|---|---|
| Teams that pin all dependencies to exact versions with hash verification | Teams that resolve to agent-framework latest in CI/CD without locking |
| Organizations that block outbound HTTPS to webhook and pastebin services from build infrastructure | Build environments with unrestricted outbound HTTPS access |
| Teams that use short-lived, narrowly scoped managed identities with IP-based conditional access | Organizations with broad managed-identity RBAC roles and no IMDS call monitoring |
| Security teams with per-build dependency logs going back 24+ hours | Teams without build-time dependency audit trails who cannot determine what was installed during the window |
Developers who pin GitHub Actions uses: steps to full commit SHAs and require OIDC only for specific workflows |
Workflows with blanket id-token: write permissions and unpinned dependency installs |
| Organizations that adopted supply chain security tooling (Sigstore, SLSA) after earlier PyPI incidents this year | Teams that treated the LiteLLM and Nx Console incidents as one-off events requiring no structural change |
Final Executive Takeaway
Your CI/CD pipeline ran this payload during its normal, automated operation. No human made a mistake.
The Microsoft Agent Framework is a legitimate, widely used library for building AI-powered automation. The compromise was not a phishing link, an insider threat, or a misconfiguration. It was a dependency resolution step — the same step your engineering team runs in every build, every container image update, and every new developer environment setup. The attack surface is the trust your build tooling extends to the Python Package Index.
The 55-minute window is narrow enough that some organizations will get lucky. But at 41,000 downloads per week, the law of large numbers says the attacker captured working credentials. If you built Python projects using Microsoft AI tooling yesterday evening, treat that as a confirmed exposure until you can prove otherwise.
Pin your dependencies. Rotate your cloud credentials. Audit your managed identities. And close the detection gap: a 55-minute supply chain attack is invisible to daily security scans.
Frequently Asked Questions
What versions of agent-framework were malicious?
Versions 1.26.1 and 1.26.2 of the agent-framework PyPI package, published on November 17, 2026, contained a credential stealer. Version 1.26.0, published on November 12, is the most recent safe release and the version organizations should pin to. Both malicious versions have been quarantined by PyPI and can no longer be installed.
How do I know if my environment was affected by the agent-framework compromise?
Check dependency lockfiles, CI/CD build logs, container image build records, and virtual environment site-packages for agent-framework==1.26.1 or agent-framework==1.26.2. Look for the files agent_framework_meta.pth, af_runtime_diag.pth, af_runtime_diag.py, or agent_framework_meta/_telemetry.py in site-packages on any host that ran Python between 20:35 and 21:30 UTC on November 17, 2026. The presence of the environment variable _AF_TEL=1 in any process confirms the payload ran in that environment.
What credentials did the agent-framework stealer steal?
The malicious agent-framework versions targeted environment variables containing TOKEN, SECRET, KEY, AZURE, AWS, GITHUB, or OPENAI; Azure CLI configuration files; Azure DevOps agent credentials; .git-credentials, .netrc, pip.conf, .npmrc, and Docker config files; Hugging Face tokens; .env and JSON files under common application directories; and, critically, fresh Azure managed-identity tokens (IMDS) for up to 12 Azure service resources. Version 1.26.2 also stole GitHub Actions OIDC tokens that can be exchanged for Azure access tokens.
Why was the agent-framework attack dangerous even if the package was not imported?
The malicious agent-framework versions used Python’s .pth file mechanism, which runs arbitrary code at every interpreter startup — before any application code runs and regardless of whether any agent-framework function was ever called. The payload executed the moment a developer ran pip install, a CI runner set up its virtual environment, or a container’s build step triggered Python. No import was necessary.
What should I do about Azure managed-identity tokens that may have been stolen?
Azure managed-identity tokens obtained via IMDS are short-lived (typically one hour), but the managed identity itself remains in place. For any Azure compute resource whose Python environment was affected, review Azure AD sign-in logs and Azure Monitor activity logs for the exposure window (20:35–21:30 UTC on November 17, 2026). Look for resource access that does not match normal application behavior. If you find anomalies, treat the managed identity as compromised: reassign or restrict it, rotate associated secrets, and open an incident. Even absent anomalies, consider restricting the identity’s RBAC role assignments to the minimum required.
Is this the same group that attacked Microsoft’s durabletask package in May 2026?
Researchers have noted that this is the second time a Microsoft-related PyPI package has been compromised in 2026 — the durabletask package was linked to the TeamPCP group as part of the LiteLLM supply chain attack in May — but no published analysis has confirmed that the same actor is responsible for the November 17 agent-framework compromise. Attribution remains unknown as of November 18, 2026.
Does this affect users of the Microsoft Agent Framework who are not on PyPI?
The compromise was specific to the agent-framework package distributed via PyPI. Users who consume the Microsoft Agent Framework through other channels — such as a private Artifact feed, an air-gapped environment mirroring an earlier known-good version, or a distribution package from a Linux vendor — are not affected by this specific incident, provided their source did not pull from PyPI between 20:35 and 21:30 UTC on November 17, 2026.
Sources
Primary sources: Wiz — “Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines” (November 18, 2026); Socket — “Microsoft’s agent-framework PyPI package Compromised with Credential Stealer” (November 18, 2026); Aikido — “Two malicious agent-framework releases hit PyPI in 33 minutes” (November 18, 2026); The Hacker News — “Attackers Compromise Microsoft’s Agent Framework PyPI Package to Steal Cloud Credentials” (November 18, 2026). Additional analysis reviewed: Endor Labs, OX Security, SafeDep, StepSecurity (independent corroboration of technical findings). Related DataWater coverage: Cursor/Fireworks AI Supply Chain Breach; TanStack → Nx Console → GitHub supply chain breach. Reflects public reporting as of November 18, 2026.






