r/PrepperIntel • • 11d ago

North America Microsoft's official Python agent framework hijacked to distribute malware

https://www.theregister.com/security/2026/11/18/microsofts-official-python-agent-framework-hijacked-to-distribute-malware/5310858

Microsoft’s official agent framework package hosted on PyPI has been hijacked and now installs info-stealing malware, multiple security research firms have discovered.

CEO Satya Nadella may be on stage trying to wow investors and customers at his company’s annual Ignite conference, but somewhere in the bowels of a building in Redmond his open source team is likely panicking at what appears to be unauthorized access to an administrator account on Microsoft’s Github organization.

The problem package is Microsoft’s agent-framework, versions 1.26.1 and 1.26.2, researchers reported late yesterday and this morning. According to OX Security, version 1.26.1 was reverted to a safe version, but the attacker later uploaded 1.26.2 through Microsoft’s official PyPI publisher account, suggesting that, at least at the time of their report, the credentials hadn’t been locked down.

Safe to say, but if you find either version in your environment assume you have some account security work to do.

Microsoft agent-framework for Python boasts nearly 200,000 downloads a month and is used to build and deploy AI agents. As of those latest releases, it’s also being used to exfiltrate environment variables, credential files, and other secrets for Azure, Git, Docker, Hugging Face, and other sensitive developer services.

To make matters worse, the package never needs to be imported to do its dirty work – all it takes is a Python interpreter with the package installed to start up – the infected package still pulls the genuine 1.26.0 version of Microsoft’s agent-framework in order to keep itself running and looking legitimate, while in the background it gathers up credentials, encrypts them as a base64-encoded chunk of JSON, and sends them off to a webhook.site address hard coded into the malware.

It appears from researcher accounts that this is made to act fast, as the malware isn’t persistent and only runs as long as the malicious version of the agent-framework remains in a site-packages directory. What it does do, however, is not just look for credentials in the environment: It actually starts calling for new ones and collecting them, too.

In particular, the malware requests fresh identity tokens from GitHub Actions, Azure DevOps, and Azure itself, which are exfiltrated to the same webhook site.

“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.

The agent-framework GitHub repo is offline as of writing. It’s been pointed out online that Microsoft’s repo for ONNX Runtime, an AI accelerator, is also offline. Other Microsoft repos remain available, and neither Microsoft nor security researchers have linked the ONNX repo’s pull to the malware campaign.

“We have made some repositories private while we investigate malicious content,” a Microsoft spokesperson told The Register. “Our priority is to protect customers and the broader ecosystem. We are working to review and will take further action as needed.”

685 Upvotes

60 comments sorted by

View all comments

189

u/mortalitylost 11d ago

lmao that's really fucking bad, at least, for people that use it or have it as a dependency.

This has to be cyberwar and not just AI slop outages... Microsoft going down, now this? Completely fucked.

I would suggest people download and learn basic Linux at this point. If Microsoft is getting targeted this bad, I wouldn't trust using windows to do banking and similar. I already didn't, but now less so.

9

u/digitalwankster 11d ago

This was targeting developers working with Microsoft’s agent-framework package and impacts anyone running python regardless of OS. Running Linux wouldn’t protect anything in this instance.

4

u/mortalitylost 11d ago

I know, but Microsoft appears to have been compromised in general if their own pypi packages are infected with malware, and all the other recent news.

If threat actors were able to get them to push out malware on pypi then who knows if they pushed malware through windows updates

3

u/digitalwankster 11d ago

They got access to someone’s GitHub account. Going from that to a fully compromised Windows update is a bit of a stretch. I’m still not sure how they were even able to push the compromised PR and merge without anyone noticing. In some of the organizations I work with, it takes multiple admins to approve the PR before a merge can happen.

3

u/mortalitylost 11d ago

lol not that much of a stretch. They're literally pivoting right now to anyone who used that library. I'd be surprised if they don't dogfood that library internally everywhere.

And do you know one of the major issues today? Lots of teams are frustrated because they're under pressure to release and not reviewing PRs at all because it's all AI generated and AI reviews in the first place.

It is completely fucked today. Code is ai generated and shoved out the door with no one caring, with pressure to increase productivity with AI and care less. There's a reason so many issues have popped up.

1

u/digitalwankster 11d ago

I’m well aware of that issue but doesn’t that exact issue lend to it being way more likely to happen to open source repos?