Credential stealer found in two Microsoft agent-framework releases on PyPI
Help Net Security reported on November 19, 2026 that two builds of Microsoft’s agent-framework, distributed through the Python Package Index (PyPI), contained code designed to take cloud and CI/CD credentials from developer machines. The project is Microsoft’s open-source kit for creating AI agents and running them inside workflows. The security companies StepSecurity, OX Security and Socket spotted the tainted builds and published their findings.
What the malicious releases did
According to StepSecurity, versions 1.26.1 and 1.26.2 went up on November 17, 2026. The malicious payload is set up as a .pth startup hook, so it fires whenever Python launches in an affected environment. Nobody has to import the framework for it to run. PyPI quarantined both versions, yet 1.26.2 was uploaded after 1.26.1 had been quarantined. StepSecurity reads this as a sign that the attacker kept publishing access.
OX cites 192,534 monthly downloads for the package. Version 1.26.0 is the most recent clean release. Both rigged versions still relied on the legitimate 1.26.0 release of agent-framework-core, which meant the toolkit kept behaving normally while the theft happened out of sight. With 1.26.2, the attacker put back Microsoft’s original package initializer and relocated the hook to a new file, af_runtime_diag.pth, making detection harder.
What the stealer collects
The malware harvests environment variables whose names include terms like TOKEN, SECRET, AZURE, AWS and GITHUB. It also inspects the environments of as many as 300 other running processes. Beyond that, it copies .env files and the login details that cloud command-line tools, package managers, Git, containers and model hubs keep saved on disk (examples include Azure CLI and Docker).
It goes further by asking cloud services for new tokens. Socket’s researchers said it actively requests fresh Azure managed-identity and CI federation tokens, and 1.26.2 added GitHub Actions OIDC tokens. StepSecurity stressed that these are only attempts, and there is no confirmation that any token was actually issued. The collected data is compressed, encoded and delivered to a webhook.site endpoint in one request.
Response guidance
StepSecurity tells anyone who installed either version to isolate the hosts and runners involved before using Python or pip again, rebuild from a clean base image, and pin agent-framework at 1.26.0. OX recommends regarding every secret reachable from the host as compromised. StepSecurity adds that rotating stored secrets does not revoke identity tokens already handed out, so OIDC permissions, federated credentials and managed-identity role assignments should be reviewed too.
Eric Paulsen, Field CTO, EMEA at Coder, said a build system able to request new cloud tokens is a credential in its own right. In his view, swapping out stored passwords and keys alone does not fully address the problem. He proposed installing from an internal mirror of approved versions, running builds in environments destroyed after each job with credentials that expire within an hour, and blocking outbound traffic to destinations not on an approved list.
None of the reports say how the attacker obtained publishing rights.
Why it matters for agents
This section is analysis, not reporting. Agent frameworks often run where cloud identities, CI pipelines and model-hub tokens are within reach, and those are what this stealer targeted. Since the hook triggers when the interpreter starts, an agent runtime or build job could be exposed even if nothing ever calls the framework.
The interest in managed-identity and federation tokens suggests that rotating static secrets may fall short for automated workloads. Teams operating agents may want to check which identities their runners can obtain, how long those credentials last and where outbound traffic is permitted. The sources do not say how many installations were affected, and the unexplained publishing access leaves open whether other packages face a similar risk.
Sources
- Credential stealer slipped into Microsoft’s official Python agent framework — helpnetsecurity.com
This article was prepared with AI assistance and reviewed by an Emerge Times editor before publication. Licensed CC BY 4.0: credit “Emerge Times (emergetimes.com)”. Usage & License. Featured images are AI-generated illustrations; any logos shown are trademarks of their owners, and Emerge Times is not affiliated with them.
