Skip to content
InYourGeek
visiteur@inyourgeek — shell
↹ compléter↑↓ historique⏎ ouvrirhelp
FR

The Monday letter · the tech and security week in one email

Free, every Monday, via Brevo (EU), one-click unsubscribe · your data and rights

Security· 3 min read

Microsoft Agent Framework: two booby-trapped PyPI releases stole secrets

On 17 November, two fraudulent versions of Microsoft's agent-framework Python package landed on PyPI to harvest cloud and CI/CD credentials. They were pulled in under an hour, but Microsoft wants affected environments rebuilt, not just tidied up.

A Python package box with a Microsoft-style official seal, a thin wire running from inside it to a hooded figure collecting glowing cloud keys and tokens

What happened

On 17 November 2026, two versions of Microsoft’s Python meta-package agent-framework, numbered 1.26.1 and 1.26.2, landed on PyPI without Microsoft’s blessing. They went up 33 minutes apart, and both shipped with a program built to steal credentials. According to Wiz Research, they were pulled less than an hour after the first one appeared. The package is used to build and orchestrate AI agents and racks up nearly 200,000 downloads a month. Nobody knows how many times the bad versions were installed.

On 25 November, Microsoft temporarily closed the framework’s GitHub repository as a precaution, with no reopening date. On 1 December, Le Monde Informatique rounded up the analyses from Wiz Research and SafeDep, which detail how the attack worked.

You don’t need to use the framework to be exposed

The malicious code rode in on a .pth file. This built-in Python mechanism normally just tells the interpreter where to find modules, but it can also run code the moment the interpreter starts. Nobody had to import Agent Framework, let alone run an AI agent: launching an automated test or any Python app in an environment where one of the two versions was installed was enough. Less a booby-trapped door than a booby-trapped doormat.

So the question isn’t whether your code calls this framework. It’s whether 1.26.1 or 1.26.2 got installed anywhere on 17 November: a developer laptop, a container image or a CI job. Check your lock files, your pipeline install logs and any images built that day. According to Microsoft, only the agent-framework meta-package is affected. The framework’s other Python packages, the .NET components and Semantic Kernel were spared. The malicious code lived in the packages distributed on PyPI, not in the GitHub repository.

The secrets it was after

According to Wiz Research, the program had a soft spot for the Azure ecosystem. It went hunting for API keys, secrets stored in environment variables, Azure DevOps credentials and tokens tied to managed identities. The second version also tried to grab GitHub Actions OpenID Connect (OIDC) tokens.

That last one deserves a closer look. With some identity federation setups with Microsoft Entra ID, those tokens could unlock Azure resources without a single long-lived secret stored in the environment. In that case there’s no password to change, which sounds like good news until you realise there’s no reset button either. You need to examine what the federated identities did and what rights the pipeline was granted. If either version ran on your side, treat every secret of those kinds in the environment as exposed, and rotate it.

Wiz Research analysed 50 requests. 17 contained stolen data, corresponding to three cases of actual exfiltration. The rest came from the attackers themselves or looked like security scans. That count is not a full tally of the incident.

Uninstalling isn’t enough

Microsoft is urging affected organisations to rebuild their environments. Removing the offending version is like escorting the burglar out and assuming the silverware put itself back: whatever the program did while it ran stays done.

The origin of the compromise hasn’t been established. Wiz Research’s hypothesis is that a client certificate and its private key were compromised. They’re tied to ESRP (Engineering System Release Pipeline), the internal service Microsoft uses to sign and publish the package. According to the researchers, a first publishing attempt from AWS infrastructure was blocked by IP filtering. A second, from an address space owned by Microsoft, went through. Microsoft hasn’t publicly confirmed this scenario. SafeDep spotted a new account appearing on the day of the attack with publishing rights on Agent Framework and five related projects. Its role remains unclear.

So on 17 November, a package published under the vendor’s official name guaranteed precisely nothing. The attacker didn’t sneak past the bouncer: they walked in wearing a staff badge.

Sources (1)

Written with AI assistance from the sources cited above, then reviewed and approved before publication by Sébastien Soulier.

The Monday letter

The tech and security week, every Monday in your inbox

What to patch first, data breaches, the articles with pictures. Free, no ads, one-click unsubscribe.

Free, every Monday, via Brevo (EU), one-click unsubscribe · your data and rights