Microsoft Agent Framework PyPI Package Compromised to Steal Cloud Credentials
Supply chain attackers have once again turned to the Python Package Index (PyPI) as a delivery mechanism, this time compromising Microsoft's agent-framework package to distribute a credential stealer. The malicious releases, versions 1.26.1 and 1.26.2, were published just 33 minutes apart on November 17, 2026, and were flagged independently by multiple security firms, including Aikido, Endor Labs, OX Security, SafeDep, Socket, StepSecurity, and Google-owned Wiz.
According to the original report from The Hacker News, the compromised versions are designed to execute a credential stealer every time Python starts, turning any developer environment that installed the package into a potential exfiltration point.
What Happened
The agent-framework package is part of Microsoft's tooling for building AI agents, which makes it a high-value target for attackers seeking access to cloud environments. Rather than exploiting a vulnerability in the code itself, the attackers appear to have gained the ability to publish new versions to the package's PyPI listing. The two malicious releases were pushed in quick succession, a common tactic used to increase the odds that at least one version is picked up before defenders react.
The most concerning aspect of the compromise is its persistence mechanism. By hooking into Python's startup process, the stealer does not need the developer to explicitly run the package's code. Any subsequent Python invocation in the affected environment can trigger the payload, which is designed to harvest credentials — particularly those associated with cloud platforms.
Why Cloud Credentials Are the Prize
Developer workstations and CI/CD runners are often the most privileged systems in an organization. They frequently hold long-lived cloud access keys, session tokens, and configuration files for services such as AWS, Azure, and Google Cloud. A stealer that runs on every Python start has repeated opportunities to collect these secrets and send them to attacker-controlled infrastructure.
This incident fits a broader pattern of supply chain attacks targeting package ecosystems. Rather than breaching a hardened production environment directly, adversaries compromise the tooling developers trust, then wait for those tools to be pulled into build pipelines and local machines. The blast radius can extend well beyond the initial victim, especially in organizations that use shared base images or cached dependencies.
Coordinated Detection
The fact that seven independent security organizations flagged the malicious versions in a short window is a positive signal for the ecosystem. Registries and researchers increasingly share telemetry on suspicious package publications, and automated scanners can catch anomalous releases before they reach wide adoption. However, detection speed is only part of the equation — the window between publication and removal is when the most damage can occur.
As of the initial reporting, the status of the malicious versions was still developing, and organizations were advised to treat any installation of versions 1.26.1 or 1.26.2 as potentially compromised.
Recommended Response
Security teams should take the following steps:
- Audit dependency manifests and lockfiles for
agent-frameworkversions 1.26.1 and 1.26.2 across repositories, container images, and CI configurations. - Rotate cloud credentials and any other secrets accessible from environments where the affected versions were installed. Assume exposure until proven otherwise.
- Inspect for persistence in Python startup paths, including
sitecustomize,.pthfiles, and any modifications to interpreter initialization that could re-trigger the stealer. - Review outbound network logs from developer machines and build runners for connections to unfamiliar endpoints around the time of installation.
- Pin and verify dependencies using hashes and trusted registries, and enable automated alerts for new releases of security-sensitive packages.
The Bigger Picture
This compromise underscores a persistent truth about modern software supply chains: the packages developers install are part of the attack surface, and trust in a well-known publisher is not a substitute for verification. Microsoft's brand lent credibility to the malicious releases, and the 33-minute gap between them suggests an automated or scripted publishing process on the attacker's side.
For defenders, the lesson is to treat package publication events as security telemetry. Monitoring for unexpected version bumps, unusual maintainer activity, and install-time behavior changes can catch these incidents earlier. Where possible, organizations should adopt reproducible builds, dependency pinning, and least-privilege cloud credentials so that a single compromised package cannot translate into broad cloud access.
The investigation into how the attackers obtained publishing access to the package is ongoing, and further details are expected as Microsoft and the researching firms complete their analysis.
Source: The Hacker News