Microsoft agent-framework on PyPI hijacked to steal secrets
Two versions of Microsoft's Python agent-framework on PyPI carried info-stealing malware that runs without the package ever being imported.

If you installed Microsoft's Python agent-framework package recently, check which version you got. Versions 1.26.1 and 1.26.2 on PyPI, the main Python package repository, have been hijacked and install malware that steals developer credentials.
Security researchers reported the problem late on Tuesday and this morning. According to OX Security, 1.26.1 was reverted to a safe version, but the attacker then uploaded 1.26.2 through Microsoft's official PyPI publisher account. That suggests the credentials were still not locked down when the report was written. The researchers point to what looks like unauthorised access to an administrator account on Microsoft's GitHub organisation.
What does the malicious agent-framework do?
The package is used to build and deploy AI agents and gets nearly 200,000 downloads a month. The bad versions collect environment variables, credential files and other secrets for Azure, Git, Docker, Hugging Face and other developer services. The data is packed into base64-encoded JSON and sent to a webhook.site address hard coded into the malware.
You never have to import the package. Simply having it installed is enough, because it runs whenever a Python interpreter starts. It also pulls in the genuine 1.26.0 release so everything keeps working and looks normal.
The malware also asks for new identity tokens from GitHub Actions, Azure DevOps and Azure, and sends those to the same address. "That combination of passive theft and active token requests makes it especially dangerous in cloud build environments, because even short-lived tokens are useful when they're exfiltrated right away," said researchers at OpenSourceMalware.
It is not persistent. It only runs while the malicious version sits in the site-packages directory.
What should you do?
If either version turns up in your environment, assume your secrets were exposed and rotate the credentials.
The agent-framework GitHub repository is offline. So is the repo for ONNX Runtime, an AI accelerator, though neither Microsoft nor the researchers have tied that to the malware campaign. A Microsoft spokesperson said the company made some repositories private while it investigates malicious content, and will take further action as needed.
Apps worth a look
Tap the right tiles, add them up, hit the target. Easy to learn, hard to master. Free, for all ages.
Talk to an AI conversation partner; every sentence comes back corrected and explained in your language. 9 languages, A1 to C2.
Open EDIFACT and X12 messages, see every segment explained, convert to JSON/XML, export PDF and Excel. Runs locally, no upload.
Pick who it is for, the occasion and their personality. The search engine reads product descriptions from local shops and ranks what fits. Free, no sign-up.
More from this day
See all →
CreditNirvana flaws exposed 6.6 million debt accounts

Java4Shell: the Java flaw found with OpenAI's GPT-6 Cyber

One UI 9.5 lets you download every Galaxy Over the Horizon ringtone


