← Back to articles
● Newsmicrosoftai agentspypisupply chainazure

Microsoft Agent Framework hijacked on PyPI to steal Azure keys

By · November 18, 2026 at 5:05 PM UTC · 4 min read

Two fake versions of Microsoft's official agent-framework package, 1.26.1 and 1.26.2, were published to PyPI on November 17 with malware that steals Azure, AWS, GitHub and OpenAI credentials. PyPI has pulled them. How to tell if you're affected and what to do.

File JG · DocumentBack to news

Microsoft Agent Framework hijacked on PyPI to steal Azure keys

Type
News
Author
Date
Reading time
4 min read
Topics
Cybersecurity, AI
Subjects
microsoft, ai agents, pypi, supply chain, azure

Summary

Two fake versions of Microsoft's official agent-framework package, 1.26.1 and 1.26.2, were published to PyPI on November 17 with malware that steals Azure, AWS, GitHub and OpenAI credentials. PyPI has pulled them. How to tell if you're affected and what to do.

Microsoft's official package for building AI agents in Python, agent-framework, served two versions carrying a credential stealer for less than an hour. As reported by BleepingComputer1 and The Hacker News2, citing analyses from several security firms, versions 1.26.1 and 1.26.2 were published to PyPI on November 17 and went looking for Azure, AWS, GitHub, Docker, Hugging Face and OpenAI keys on the machines and servers where they were installed. PyPI has quarantined them and the clean version is 1.26.0.

I couldn't open the researchers' reports from here, so what follows comes from those two outlets' coverage. I'll update this story if Microsoft explains what happened.

◢What happened to Microsoft Agent Framework?

Agent Framework is Microsoft's open-source framework for building and orchestrating AI agents, and agent-framework is the package that installs all its pieces in Python. According to BleepingComputer1, it gets around 200,000 downloads a month (The Hacker News2 puts it at about 190,000). It sits in plenty of company projects that are testing or rolling out agents.

Someone managed to publish new versions under Microsoft's official project on PyPI, the registry Python packages are downloaded from. According to The Hacker News2, the two malicious versions were available roughly between 8:35 and 9:20 p.m. UTC on November 17. Today, the package's PyPI page3 lists 1.26.0 as the latest version.

What isn't known yet is how the attacker got in. BleepingComputer asked Microsoft and hadn't heard back at publication time, and neither outlet carries a statement from the company.

◢What did the malicious code do?

Both versions added a .pth file to the Python installation. As Endor Labs explains in the coverage by The Hacker News2, Python runs those files every time it starts, so the stealer kicked in with any Python script in that environment, even if nobody ever used Agent Framework.

On top of that, the fake versions still depended on the legitimate agent-framework-core 1.26.0 package, so the framework worked normally and nothing looked off.

According to both outlets, the stealer went after:

  • ▹Environment variables with credential-like names.
  • ▹Config files holding secrets: Azure CLI files, .npmrc, pip.conf, .netrc, .git-credentials, Docker config, Hugging Face and Azure DevOps agent files, plus .env files.
  • ▹Fresh tokens: it requested Azure managed identity tokens and Azure DevOps OIDC tokens, and read the machine's Azure instance metadata.
  • ▹In version 1.26.2, GitHub Actions OIDC tokens too, along with a broader search of environment variables.

Everything it gathered was compressed and sent over HTTPS to a webhook.site address controlled by the attacker.

◢Why isn't changing passwords enough?

This detail matters. According to SafeDep, cited by The Hacker News2, the malware didn't just copy stored keys: it used the server's or the pipeline's identity to request new tokens from Azure. That's why, SafeDep says, rotating stored secrets doesn't cover those tokens. You also need to check what the Azure identities with access to that environment actually did.

And the most likely place it got installed isn't a developer's laptop but a CI pipeline that always pulls the latest version. Those machines tend to hold exactly the credentials that do the most damage: the ones that deploy to production.

◢Am I affected?

You're affected if any environment (a laptop, a server, a container or a CI pipeline) installed agent-framework 1.26.1 or 1.26.2 on November 17. If you pin versions and were on 1.26.0 or earlier, or nothing was installed that evening, you should be fine. If you don't use Agent Framework, this doesn't concern you.

The quick way to find out is to check the installed version (pip show agent-framework) and go through your pipeline logs from that evening.

◢What to do if you installed it

These are the recommendations reported by BleepingComputer1 and The Hacker News2:

  1. ▹Isolate the affected machines and CI runners, and don't run Python or pip on them again until they're clean.
  2. ▹Rebuild the environment from scratch, pinned to version 1.26.0.
  3. ▹Search your proxy and DNS logs for connections to webhook.site, telling apart the ones that were blocked from the ones that actually sent data.
  4. ▹From a clean machine, rotate every credential that environment could reach: Azure, AWS, GitHub, Docker, Hugging Face, OpenAI and whatever sat in the .env files.
  5. ▹Review your Azure identities and their sign-in and activity logs, plus the GitHub Actions workflows that deploy to Azure.

◢What to learn

This isn't the first time. Back in May it happened to durabletask, another Microsoft Python package, as The Hacker News2 points out. And it fits what we've seen this autumn against AI developer tools, like the AI keys stolen at Railway and Fireworks or the hijacked GitHub accounts used to pull CI secrets.

The lesson for any company building agents is boring but effective. Pin your dependency versions and update them on purpose, not every time the pipeline runs. Give each pipeline only the permissions it needs. And watch the outbound connections from your build servers: a request to a service like webhook.site from a CI machine is an alert you can set up today.

If your team is getting started with AI agents and you want to do it without leaving the keys out in the open, that's part of what I cover in my cybersecurity and AI training.


← Back to articles

The week's posts, in your inbox

A weekly roundup of what I publish and, if you want, an alert straight away when something serious happens. Always only on the topics you pick.

What do you want to hear about?
Which emails do you want?

You'll be asked to confirm, and you can unsubscribe from any email. Privacy policy

The week's posts, in your inbox

A weekly roundup of what I publish and, if you want, an alert straight away when something serious happens. Always only on the topics you pick.

What do you want to hear about?
Which emails do you want?

You'll be asked to confirm, and you can unsubscribe from any email. Privacy policy

Related documents

  1. Article

    GL.iNet routers hacked via GoodCloud: how to check yours

    On 20 November an attacker used GoodCloud, GL.iNet's remote management cloud, to run root commands on customers' routers and KVMs. GL.iNet has shipped fixed firmware, but updating does not clean a device that was already hit. What happened, how to check and what to do.

  2. News

    pCloud Pass cyberattack: what we know and what to do if you use it

    pCloud has confirmed a cyberattack on its pCloud Pass password manager after users received alerts about unknown devices connecting to their accounts. It says some email addresses were exposed and its cloud storage was not affected. What we know, what we don't and what to do.

  3. News

    SAP confirms a security incident in its GitHub environment

    SAP has confirmed a cybersecurity incident after reports that attackers stole employee tokens and got into its GitHub development environment. It says it sees no access to customer data. What we know, what we don't and what to watch if your company runs SAP.

End of documentBack to news