Poisoned Versions of Microsoft's Agent Framework Briefly Hit PyPI, Targeting Cloud and CI Credentials

Poisoned Versions of Microsoft's Agent Framework Briefly Hit PyPI, Targeting Cloud and CI Credentials

On November 17, 2026, two malicious versions of Microsoft's official 'agent-framework' package, labeled 1.26.1 and 1.26.2, briefly appeared on the Python Package Index, or PyPI. The package is widely used, with roughly 192,534 monthly downloads reported by security firm OX Security. Many observers note that the incident adds to a growing list of supply chain compromises affecting popular open-source package ecosystems, and several researchers have flagged it as part of a recurring pattern targeting Microsoft's Python packages specifically.

How the Credential-Stealing Payload Worked

According to multiple security vendors who examined the poisoned releases, the malicious payload was installed through a .pth file startup hook, a technique that can trigger code execution automatically when the Python interpreter starts. Researchers reported that the payload scanned environment variables, credential files, and tokens across as many as 300 running processes. Reported targets included Azure, AWS, GitHub, CI/CD pipeline secrets, and package-manager credentials. A recurring concern raised by researchers is that the malware did not simply harvest static secrets already present on a system; it also appeared to actively request freshly issued managed-identity and OIDC tokens. Several reports indicate the stolen data was sent to a webhook.site endpoint, a hosting pattern sometimes used by attackers for quick data collection.

Quarantine, Continued Access, and Rapid Detection

PyPI quarantined version 1.26.1 after it was identified, but researchers observed that a second malicious version, 1.26.2, was uploaded afterward. This sequence has led analysts to suggest that whoever published the packages may have retained some form of publishing access even after the initial response. Multiple independent firms, including OX Security, Wiz, JFrog, Orca Security, Chainguard, Elastic Security Labs, Endor Labs, SafeDep, StepSecurity, and Socket, examined the incident. Combined, the malicious versions were reportedly live for under an hour before full removal, and version 1.26.0 is described as the last confirmed clean release prior to the compromise. Elastic Security Labs has stated that its detection systems flagged the issue within six minutes of publication, though this figure, like other technical details in this story, comes from vendor reporting rather than independent verification.

Unresolved Questions and Remediation Challenges

As of this writing, Microsoft has not publicly confirmed exactly how the attacker obtained the access needed to publish these versions. This leaves an important piece of the incident unresolved, and a recurring consumer and developer concern across the security community is that simply rotating stored secrets may not be sufficient. Because the payload appeared capable of requesting new tokens during the exposure window, security teams examining this incident have pointed out that already-issued tokens would remain valid even after secrets are rotated, unless those tokens are also explicitly revoked. There is also discussion among researchers about residual risk from cached or pinned builds that may still reference the compromised versions even after the takedown.

A Repeating Pattern Across Microsoft's Python Packages

This is not an isolated event. A similar compromise reportedly affected Microsoft's durabletask package on PyPI in May 2026. Taken together, some analysts view this as evidence of a possible pattern of repeated, and possibly coordinated, targeting of Microsoft's Python package ecosystem, though the exact relationship between the two incidents, if any, has not been established by Microsoft or independently confirmed. The pattern has prompted broader questions among security researchers about the resilience of publishing pipelines for high-download official packages.

What Security Teams Should Do Now

Security researchers covering this incident have offered several practical recommendations. Organizations are encouraged to audit their environments for installations of versions 1.26.1 or 1.26.2 and roll back to version 1.26.0 or a later verified-clean release. Beyond simply rotating stored secrets, teams are advised to consider reissuing or revoking tokens that may have been generated during the exposure window. Reviewing the scope of CI/CD and package-manager credentials is also suggested as a way to limit the potential impact of similar incidents in the future.

More Tech articles · CuencaLife home