Credential stealer slipped into Microsoft's official Python agent framework
Two releases of Microsoft’s official agent-framework package on the Python Package Index (PyPI) carried code that steals cloud and CI/CD credentials from developers’ systems.

Two releases of Microsoft’s official agent-framework package on the Python Package Index (PyPI) carried code that steals cloud and CI/CD credentials from developers’ systems.
Agent Framework is Microsoft’s open-source toolkit for building AI agents and running them in workflows, and three supply chain security companies, StepSecurity, OX Security and Socket, caught the malicious versions and shared their analysis.
In the second release, the attacker restored Microsoft’s original package initializer and moved the hook into a new file named af_runtime_diag.pth, which makes the change harder to spot.
StepSecurity cautioned that the code only attempts these requests, and there is no confirmation that any tokens were issued.
On November 17, 2026, versions 1.26.1 and 1.26.2 of the official Microsoft agent-framework package on PyPI were published carrying a credential-stealing payload.
The payload is installed as a .pth startup hook, so it executes during Python startup in an affected environment when the interpreter processes the installed hook, with no import of the framework required, wrote StepSecurity.
It reads the environments of up to 300 other processes and copies .env files along with credential files for Azure CLI, pip, npm, Git, Docker and Hugging Face.
The haul is compressed, encoded and sent to a webhook.site endpoint in a single request, and eric Paulsen, Field CTO, EMEA at Coder, says the token requests change how teams should respond.
By the time anyone checks it, the code has already run, and finally, block outbound connections to anything that isn’t on an approved list.
Why it matters
Both rigged versions kept their dependency on the genuine agent-framework-core 1.26.0, so the framework worked as usual while the credential stealer ran in the background.
The stealer collects environment variables with names containing strings such as TOKEN, SECRET, AZURE, AWS and GITHUB.
What security teams should do
- Anyone who installed either version should isolate the affected hosts and runners before running Python or pip again, rebuild from a clean base and pin agent-framework to 1.26.0, StepSecurity advises.
- StepSecurity warns that rotating stored secrets won’t cancel identity tokens that were already issued, so teams should also review OIDC permissions, federated credentials and managed-identity role assignments.
What it meansMicrosoft's Azure Linux 4 offers a cost-effective OS solution for virtual machines, enhancing security and simplifying management for cloud users.
Ask your IT team this weekWhat systems are currently running on Azure Linux, and how will we transition to version 4?Which security tools are integrated with our Azure Linux environments?
DecisionThe IT team will assess the migration plan to Azure Linux 4, and security will verify its implementation.