Threat actors compromised the official Python Package Index repository for Microsoft's Agent Framework toolkit, uploading two backdoored releases designed to harvest sensitive cloud credentials and development secrets. The open-source project, which serves as a core framework for building and orchestrating artificial intelligence agents, sees roughly 190,000 to 200,000 monthly downloads on PyPI.
The unauthorized versions, tagged as 1.26.1 and 1.26.2, were pushed on November 17, 2026. PyPI administrators quarantined the packages shortly after detection, but the incident highlights ongoing supply chain risks targeting artificial intelligence developers and automated build pipelines.
Stealth Execution via Python Startup Hooks
Rather than waiting for an application to import the malicious code, the attackers leveraged Python path configuration files to achieve automated execution. Analysis published by BleepingComputer and The Hacker News showed that the malicious wheels dropped a .pth file directly into the local environment's site-packages directory.
Because the Python interpreter parses and executes import statements found inside .pth files upon initialization, the payload triggered on any invocation of the interpreter within an infected environment. This design ensured the malware ran during routine operations, including invocations of package tools such as pip, regardless of whether a developer explicitly imported the Agent Framework library.
Version 1.26.1 dropped agent_framework_meta.pth to invoke malicious code located in agent_framework_meta/_telemetry.py. The follow-up 1.26.2 release, published shortly after the initial package was quarantined, shifted the entry mechanism to af_runtime_diag.pth and pointed to a newly introduced af_runtime_diag.py module. Both malicious releases retained the legitimate dependency on agent-framework-core 1.26.0, allowing AI workflows to function normally without alerting victims.
Harvesting Cloud Secrets and Dynamic Tokens
Multiple security vendors, including Socket, StepSecurity, Endor Labs, and OX Security, observed that the payloads actively hunted for access keys across local environments. The script parsed environment variables via substring matching and scraped configuration files, including Azure CLI profiles, Docker configs, Git credentials, .npmrc, pip.conf, .netrc, Hugging Face configurations, and loose .env files.
Beyond static configuration files, the malware actively requested newly generated cloud tokens from running compute infrastructure. In Azure environments, it queried the local Instance Metadata Service at 169.254.169.254 or designated App Service endpoints to obtain Azure managed identity tokens, capturing instance metadata details alongside the keys.
In CI/CD automation pipelines, the malware leveraged pipeline variables to retrieve federated OpenID Connect tokens from Azure DevOps. The second release expanded its capabilities to target GitHub runner directories and solicit GitHub Actions OIDC tokens. Stolen information was packaged into a compressed, Base64-encoded JSON blob and transmitted to a hardcoded endpoint hosted on webhook[.]site.
Quarantine and Investigation
Repository maintainers moved quickly to mitigate the compromise, yet the incident revealed persistent access by the threat actor. PyPI quarantined version 1.26.1 shortly after its arrival, but the attacker pushed version 1.26.2 just minutes later before that release was also quarantined. It remains unconfirmed how the attackers compromised the project or bypassed publishing controls.
The breach marks the second time this year that an official Microsoft-maintained PyPI project has been hijacked. In May 2026, the TeamPCP group pushed tainted versions of Microsoft's durabletask library to spread the Mini Shai-Hulud worm.
What You Should Do
Security teams and developers who maintain Python workflows or run automated CI/CD pipelines should immediately take steps to assess and remediate potential exposure:
- Check build logs: Review pipeline execution and developer system logs between 8:35 p.m. and 9:20 p.m. UTC on November 17, 2026, to identify any installations of
agent-frameworkversions 1.26.1 or 1.26.2. - Isolate and rebuild environments: Quarantine any virtual environment, container, or build runner that pulled the affected releases. Rebuild the environments from scratch and strictly pin dependencies to the verified, safe release version 1.26.0.
- Inspect network egress: Query proxy, firewall, and DNS telemetry for outbound connections directed to
webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb, noting whether transmissions completed successfully. - Rotate exposed credentials: Invalidate and rotate all secrets reachable from affected hosts, including Azure CLI tokens, GitHub personal access tokens, Docker keys, Hugging Face credentials, and custom service accounts.
- Audit cloud identity logs: Review Azure Active Directory sign-in activity, federated identity credentials, and deployment pipelines linked to GitHub Actions and Azure DevOps to spot unauthorized resource access.





