Hackers compromised Microsoft’s official Agent Framework Python package on PyPI, publishing two malicious versions that stole cloud credentials from developers’ machines. The attack, discovered by security researchers on November 17, turned a trusted toolkit for building AI agents into a delivery vehicle for a credential stealer that ran every time Python started, even if the package was never imported.
The malicious releases, versions 1.26.1 and 1.26.2, were published on November 17, 2026. Both kept their dependency on the legitimate agent-framework-core 1.26.0 package, so applications built on the framework kept working normally while the malware ran quietly in the background. Agent Framework is Microsoft’s open-source toolkit for building AI agents and coordinating them in workflows, and BleepingComputer puts its PyPI downloads at roughly 200,000 a month.
What the malware stole
Version 1.26.1 harvested secrets from environment variables, local configuration files and other running processes where permissions allowed, targeting Azure, AWS, GitHub, Docker, Hugging Face, OpenAI and other services. It also tried to obtain Azure managed identity access tokens and Azure DevOps OIDC tokens, which could have opened access to additional cloud resources. Version 1.26.2 went further, adding requests for GitHub Actions OIDC tokens and searches of GitHub runner directories.
The mechanism was a Python startup hook. The first malicious release used a file called agent_framework_meta.pth to execute the stealer in agent_framework_meta/_telemetry.py whenever a Python interpreter started. The second release restored the original package initializer and moved the malicious code into af_runtime_diag.pth and af_runtime_diag.py, a change that would make simple diffing against the first version less useful. Both versions sent what they collected to the same attacker-controlled endpoint, webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb.

The 41-minute window. Graphic: GPTOnline
A 41-minute window, and a second upload after quarantine
PyPI quarantined the first malicious release, but the attacker published a second version roughly 2.5 minutes later, and that version was quarantined about eight minutes afterward. The second upload is the detail that matters most: it shows the attacker still held publishing access after the first response, so quarantining one release did not end the compromise. According to timelines published by StepSecurity and JFrog, the first version went up at 20:35 UTC on November 17 and was quarantined at 21:06; the second appeared at 21:08 and was quarantined at 21:16. The whole malicious lifetime was about 41 minutes, yet JFrog’s analysis found the automated dependency updater Renovate had already opened update pull requests within six minutes of the first upload.
It remains unclear how the attacker gained access to publish malicious releases under Microsoft’s official PyPI project. BleepingComputer said it contacted Microsoft to learn the point of breach but had received no response by publication time. Microsoft had not publicly confirmed a root cause when the security analyses were written.
What developers should do
Developers who installed either malicious version should isolate the affected environments, avoid running Python or pip until they are secured, and rebuild from a known-clean environment using the safe 1.26.0 release. Any credentials within reach of the compromised environment should be rotated immediately. Investigators can check egress logs for the webhook URL path to determine whether data actually left the network, distinguishing blocked requests from completed transfers.

The compromise at a glance. Graphic: GPTOnline
Why it matters
The incident is a reminder that the AI agent stack is now a prime target for supply-chain attacks. Agent frameworks typically run with broad access to cloud accounts, code repositories and model providers, so a single compromised package can hand an attacker the keys to all of them. The startup-hook trick also matters: installation alone was enough, with no import and no user action beyond installing or updating the package. It is the second supply-chain attack on AI tooling GPTOnline has covered in a month, after the LiteLLM 1.107.0 compromise in October, and it underlines why pinning versions and checking package provenance has become basic hygiene for AI developers.
Sources
- BleepingComputer, “Microsoft’s Agent Framework PyPI package compromised to steal credentials,” November 18, 2026
- StepSecurity and JFrog timelines, as reported in “A Python Startup Hook, a Hijacked Microsoft Package, and 41 Minutes on PyPI,” November 2026
- Pivot News, “Security firms flag malicious Microsoft Agent Framework releases,” November 18, 2026
- PyPI, agent-framework project page
- GPTOnline, “LiteLLM 1.107.0 Compromised in Supply Chain Attack Targeting AI Credentials,” October 22, 2026

