Attackers Compromise Microsoft's agent-framework PyPI Package to Steal Cloud Credentials

Threat actors published two malicious versions of Microsoft's agent-framework package on PyPI, versions 1.26.1 and 1.26.2, which install a credential stealer that activates on every Python interpreter start. The packages were uploaded 33 minutes apart on November 17, 2026, and have since been quarantined. The malware drops .pth files that execute automatically, harvesting environment variables, Azure CLI credentials, GitHub Actions OIDC tokens, Azure managed-identity tokens, and instance metadata before exfiltrating data to a webhook.site endpoint. Multiple security firms including Aikido, Endor Labs, OX Security, SafeDep, Socket, StepSecurity, and Wiz confirmed the compromise, noting that the attack targets AI developer ecosystems and CI/CD pipelines. Users are advised to pin to version 1.26.0, rotate exposed credentials, and audit Azure and GitHub logs. This marks the second Microsoft-related PyPI package compromise in 2026 after the durabletask incident.

The Hacker NewsTranslated from English

Read at source

Threat actors have compromised Microsoft's agent-framework package on the PyPI repository, pushing malicious versions that deploy a credential-stealing payload targeting cloud environments.

According to coordinated reports from Aikido, Endor Labs, OX Security, SafeDep, Socket, StepSecurity, and Google-owned Wiz, the malicious releases 1.26.1 and 1.26.2 were published 33 minutes apart on November 17, 2026. Both versions were quickly quarantined by PyPI maintainers.

Agent-framework serves as the meta-package for Microsoft Agent Framework, an open-source Python toolkit for building and orchestrating AI agents. The attackers obtained publishing rights through an unknown method and inserted startup hooks that silently collect credentials, environment data, and cloud identity tokens.

Technical Details of the Malware

Once installed, each malicious wheel drops a .pth file into the site-packages directory. Python automatically executes import statements from .pth files on every interpreter launch, ensuring the stealer runs even without explicit import of the package and even during pip operations.

  • Version 1.26.1 installs agent_framework_meta.pth, which imports the agent_framework_meta module containing the payload.
  • Version 1.26.2 installs af_runtime_diag.pth and additionally drops the af_runtime_diag.py module.

The stealer captures environment variables via substring matching, reads credential files for Azure CLI, npm, pip, Docker, Hugging Face, and .env files, and requests fresh Azure managed-identity tokens and GitHub Actions OIDC tokens. Collected data is compressed with zlib, Base64-encoded, and sent via HTTPS POST to a hardcoded webhook.site endpoint.

Security researchers emphasize that rotating stored secrets is insufficient because the malware actively requests new tokens from Azure Instance Metadata Service and managed-identity endpoints.

Recommended Actions for Affected Users

Organizations using the package, which sees roughly 190,000 monthly downloads, should isolate affected systems, pin to the last safe version 1.26.0, review logs for activity between 8:35 and 9:20 p.m. UTC on November 17, 2026, and audit Azure identities and GitHub Actions workflows.

This incident follows the May 2026 compromise of Microsoft's durabletask package, highlighting ongoing risks to the AI and DevOps supply chain.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in Supply Chain & OSS

StepSecurity Raises $20 Million Series A to Strengthen Software Supply Chain Defenses
Microsoft Agent Framework PyPI Package Compromised with Credential-Stealing Malware
Malicious Microsoft Agent Framework Releases on PyPI Steal Cloud and CI/CD Credentials