Signal

Hackers compromised Microsoft's Agent Framework Python package on PyPI, publishing two versions designed to steal cloud credentials and other information

First reported by Bleepingcomputer ·

The signal ●●●● Compiled by AI from Bleepingcomputer, Techmeme, The Register, OX Security, Socket and 9 more
Why you might care

If you use Microsoft's agent-framework Python package, your cloud and CI/CD credentials may be compromised and require immediate rotation.

What happened

Two versions of Microsoft's official agent-framework Python package, 1.26.1 and 1.26.2, were compromised on PyPI by attackers aiming to steal cloud credentials. The malicious package, downloaded over 192,000 times monthly, automatically executes on Python startup without requiring an import, making detection difficult. It harvests environment secrets, cloud credentials for Azure and CI/CD pipelines, and Azure managed identity tokens, exfiltrating them to a webhook. Researchers discovered the attack, which continued with a second malicious version after the first was reverted. The compromised code was disguised within the package's initialization process, ensuring continued functionality of the legitimate framework while silently stealing sensitive information. The attack targeted Azure and Azure DevOps environments, seeking specific tokens and credentials related to cloud services and build agents.

What it means

This incident highlights the increasing sophistication of supply chain attacks targeting widely used official packages, demonstrating a direct threat to cloud infrastructure and developer workflows. The attackers' ability to hijack an established Microsoft package and maintain its core functionality while injecting malicious code underscores the critical need for enhanced security measures in package distribution and consumption. This incident will likely spur greater adoption of package signing, dependency verification, and automated scanning tools within development pipelines to mitigate similar future threats.

The payload's stealthy execution via .pth files and its ability to harvest a broad range of credentials, including Azure managed identity tokens and CI/CD pipeline secrets, poses a significant risk to organizations relying on these services. The attackers' persistence in re-releasing a modified malicious version after the initial compromise indicates a coordinated effort to maximize impact. Organizations must reassess their security posture, focusing on stringent verification of dependencies, rotation of all potentially exposed secrets, and monitoring cloud logs for anomalous activity originating from compromised agents.

AI-written summary. May contain errors.