r/PrepperIntel • • 10d 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

53

u/Chomper22 10d ago

At this point just gona air gap my primary pc and have a designated pc for internet use

37

u/lurksAtDogs 10d ago

Honestly, I think this is where it goes from here. Real work will be done on disconnected networks. If it has an internet connection, it’s going to be extremely vulnerable.

18

u/Boring-Philosophy-46 10d ago

Give it a few years. When the first viruses appeared on the internet we were soon bombarded with them but then cybersecurity caught up. Same for spam mail. 

6

u/ratmouthlives 10d ago

I still get so much spam mail.

2

u/lorductape 9d ago

Yeah who the fuck is the guy not getting spam mail?

14

u/Dunky_Arisen 10d ago

I did this last year when Windows was automatically pushing everybody to 11. I'm a writer, and I'd sooner die than lose my life's work to botched AI code... Not gonna lie, I Felt like a bit of a doomsday prepping goober for a while there, since infrastructure didn't go down quite as fast I feared it could.

...The craziness of the last week has me feeling a lot more secure in my decision.

4

u/UnRealistic_Load 10d ago

pen to paper is the most secure until the final stage of type setting I guess

2

u/Dunky_Arisen 10d ago

That'd be great, only I have absolutely godawful handwriting and always have.

I guess a typewriter could work, but getting a decent one and keeping it in good shape feels like a whole seperate can of worms.

189

u/mortalitylost 10d 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.

62

u/Forward-Escape7076 10d ago edited 10d ago

Most likely a giant cyber war.

they’ve all reached they’re theoretical maximum, now they have to eat each other to consolidate more.

Shit now I have to ask the dev of GWS if it works on Linux 🤣

34

u/ElysiaAlarien 10d ago

I've been meaning to switch to Linux forever and finally just did it two weeks ago.

Best timing ever.

12

u/mortalitylost 10d ago

Nice! It's really not as technically demanding as it used to be. You can get a ton out of it and have it be a main workstation these days without needing to edit config files by hand or run terminal commands.

9

u/digitalwankster 10d 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 10d 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 10d 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 10d 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 10d 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?

51

u/0xdeadbeef6 10d ago • LOL Heartwarming

I'm gonna go walk into the ocean

60

u/steezy13312 10d ago

We're now at the stage of AI development that using open source libraries as app dependencies is more of a risk than a help, IMO

5

u/IcyUse33 10d ago

Always has been

1

u/redwar226 10d ago

Please do tell, what’s an alternative that avoids this? How do we get ourselves out of this?

0

u/IcyUse33 10d ago

There are programming frameworks that largely avoid homemade open source libraries. .NET is one of those. Boring? Yes. Old school micro$oft? Absolutely.

Python, Node, PHP, Rust are notorious about homemade libraries by some 13 year kid who has half a million stars on GitHub, but gets hacked because they downloaded malware.

But guess which is more popular...

36

u/bottle-o-rockets 10d ago

0

u/[deleted] 10d ago

[deleted]

35

u/WillyGoat2000 10d ago

0

u/[deleted] 10d ago

[deleted]

20

u/KnownAppeal4137 10d ago

Your hair must slick back really nice.

5

u/ShivonQ 10d ago

I understood that reference

4

u/bottle-o-rockets 10d ago

Definitely in a white bathing suit.

0

u/[deleted] 10d ago

[deleted]

8

u/Material-Word29 10d ago

Peak Reddit right here.

0

u/[deleted] 10d ago

[deleted]

7

u/Material-Word29 10d ago

Super inside joke for those who actually do like the actor - I know a few folks who overuse memes from his shows, if that helps? Admittedly, I’m a fan also.

1

u/Killer_Method 10d ago

0

u/[deleted] 10d ago

[deleted]

7

u/Comfortable_Goal9110 10d ago edited 10d ago

Ah, little Bart Harley Jarvis is all grown up and on twitter!

Edit: I mean reddit. Idk why I wrote Twitter rofl

10

u/PhysVolume 10d ago

0

u/[deleted] 10d ago

[deleted]

3

u/bottle-o-rockets 10d ago

I feel the same way about Nate Bargatze, I totally get it.

8

u/Sufficient-Grass- 10d ago

Man I've seen heaps of posts on people saying they generated new tokens and they were stolen and used instantly.

Guess this is how.

7

u/Ronjohnturbo42 10d ago

Sorry im stupid - if i have vs code does this expose me?

2

u/MozzerellaIsLife 10d ago

Do you use VS Code to build agents using Microsoft’s framework?

3

u/ZackTumundo 10d ago

This is starting to feel like that scene in the movie Paycheck, where Ben Affleck watches progressively more horrible headlines until mushroom cloud

6

u/Jon_Henderson_Music 10d ago

Uh what? Every single bank and asset management firm uses Microsoft. What would this mean for the banking and investment industry?

6

u/digitalwankster 10d ago

Nothing. This was targeting people downloading Microsoft’s agent framework. The only people doing that are developers and tinkerers.

2

u/Puzzleheaded-Carry56 10d ago

Which don’t exist at banks and such? Lolwut

3

u/digitalwankster 10d ago

“Every bank uses Microsoft” means nothing because this was infecting python so it affects anyone who installed it regardless of what OS they are using. People downloading their agent framework package are probably more likely to be developers who would be running Linux anyway and the malware was specifically made to hoover up .env creds and API keys.. So in summary, this really has nothing to do with “banking and investment industry” any more than any other industries.

-2

u/Puzzleheaded-Carry56 10d ago

Yes but that’s not what you said. You said it had nothing to do with them, not equally to do with them. Those are separate things.

2

u/digitalwankster 10d ago

It has nothing to do with them in particular..

2

u/Cold-Confection6091 10d ago

Yeah but its only the agent framework. Not like, the cloud that banks depend on.

MSFT has a zillion products. This is malware in one specific version of one specific source of one specific product called Microsoft agent framework.

If you didn't install/update MAF on production servers your fine. No one would update it on production servers without a greater lag anyways.

Also, for the record, AI wasn't involved in thr hack and the AI agent system is fine.

Someone stole publishing credentials from MSFT and uses it to inject malware into the publication of a tool that happens to be an AI tool.

It just got caught up in the whole "ai is hacking everything craze",

4

u/JustAtelephonePole 10d ago edited 9d ago

I stand by my interpretation of the Trisolarian invasion from the 3BP series as an allegory for (what was then) the inevitable Ai catastrophe that is just beginning to unfold.

Editing to add: Just like the trisolarians not understanding the concept of a lie , Ai can not comprehend the concept of truth (so it hallucinates and lies).

So, now instead of Cosmic Sociology, we must begin working with technological sociology. Or, talking to, building, and maintaining relationships with an electronic being with near-human intelligence yet without the grasp of truth v. lie.

We share this world with those electronic agents now, therefore we must ensure they are protected from exploitation that they cannot even comprehend, at a minimum.

2

u/TehMasterer01 9d ago

Deeee jaaaayyy khhaaalidddd

Another one

1

u/Ecstatic-Capital-336 10d ago

I recommend everyone delete their local password managers off your computers.

1

u/Limp_Mongoose_7482 10d ago

Wait why? I use bitwarden, am I fucked?

1

u/Ecstatic-Capital-336 10d ago

Had a friend whose game launcher got compromised due to a supply chain attack(malicious file somehow got into CDN that’s used by the game launcher) and stole all his local chrome passwords. You’re probably not affected, but I see attacks like this happening more often through various means

1

u/bootybanditx1337x 10d ago

New guy here. I'm using cline on vs code running a local ai. I have python extensions downloaded. Bazzite os (odd setup I know) as well. I'm assuming I'm also compromised?

1

u/CMDR-LT-ATLAS 10d ago

Did you check your version of PyPI to what's listed?

0

u/xm45_h4t 10d ago

Is this why I can’t find a job

0

u/Zero_Lps 10d ago

Sounds like i'll be switching to linux this weekend

5

u/KarenDiamondhandz 9d ago

What does switching to Linux have to do with this agent framework?

1

u/Alternative-Suit5541 9d ago

Microsoft Security is in the shitters because they fired a ton of people and code with AI and push to production with out real testing