Microsoft AI Agent Framework PyPI Package Hit by Credential-Stealing Malware

Attackers compromise Microsoft's official Agent Framework Python package on PyPI, publishing two malicious versions, 1.26.1 and 1.26.2, that steal cloud credentials and other sensitive data from developer systems. Agent Framework is Microsoft's open-source toolkit for building and coordinating AI agents, with roughly 200,000 monthly downloads on PyPI. The malicious releases publish on November 17, 2026, and execute automatically during Python startup, even when the package is not imported, while still depending on the legitimate agent-framework-core package to mask the attack.

The first version harvests secrets from environment variables, configuration files, and running processes, targeting Azure, AWS, GitHub, Docker, Hugging Face, and OpenAI, and also seeks Azure managed identity tokens and Azure DevOps OIDC tokens. It uses a malicious .pth file to run the stealer during Python startup. The second version, published about 2.5 minutes after PyPI quarantines the first, moves its code into a different .pth file and adds GitHub Actions OIDC token requests and searches of GitHub runner directories. Both versions exfiltrate stolen data to the same attacker-controlled webhook endpoint.

Security firms Socket, Step Security, and Ox Security discover and document the attack, and PyPI quarantines both malicious releases. However, the attacker's ability to publish the second version indicates they retain package access even after the first quarantine, raising questions about how the compromise occurred and whether account credentials or publishing tokens are stolen. Developers who installed the affected versions are urged to audit their systems for exposed credentials and rotate all secrets.

Read More at the original source →