Microsoft Agent Framework Breach: Malicious Versions Steal Cloud Credentials

Microsoft’s Agent Framework package was compromised in a supply chain attack, with two malicious versions distributing credential-stealing code.

What Happened

Both were quickly identified and removed from PyPI.

Version 1.26.0 remains the latest clean and verified release. A GitHub discussion post from an Agent Framework maintainer confirms the packages were removed and that an internal investigation is underway.

The malicious versions kept the legitimate framework components. They added unauthorized code that runs automatically when Python starts—regardless of whether an app imports the package.

How the Malware Works

The malware activates during Python startup. It runs silently in the background, even if no application uses the package directly.

It targets credentials stored in environment variables, configuration files, and running processes. It specifically seeks Azure managed identity tokens and Azure DevOps authentication tokens.

Version 1.26.2 expanded its reach to include GitHub Actions credentials. This allows attackers to access code repositories and automated build pipelines.

Key Technical Details

Malicious releases included only built packages—no source code. Legitimate releases typically provide both built and source distributions.

This deviation raises concerns about the integrity of the distribution process. It suggests the packages may have been uploaded outside official channels.

A PyPI account named vibiret was created on the day of the attack. It had publishing rights for the agent-framework package and five related projects.

While this account has been identified, no official confirmation links it to the malicious uploads.

Supply chain attack. Via original publisher. · Source

Why This Matters

Organizations using the Agent Framework could have exposed sensitive cloud credentials. These include access to Azure, Azure DevOps, and GitHub Actions.

Attackers could use stolen credentials to deploy malicious code, manipulate CI/CD pipelines, or access private repositories.

The malware runs at startup without requiring user action. This makes it hard to detect with standard monitoring tools.

What Organizations Should Do

Replace affected installations with version 1.26.0 or later from PyPI.

Rotate any exposed credentials—especially for Azure, Azure DevOps, and GitHub Actions.

Look for unusual cloud activity, such as unauthorized deployments or access to private repos.

Rebuild affected environments to remove any lingering malware.

Open Questions

It is unclear how the malicious packages were uploaded to PyPI. No corresponding releases exist in Microsoft’s main GitHub repository.

The vibiret account’s role in the attack remains unconfirmed. This lack of attribution raises broader concerns about open-source security.

Microsoft’s official Agent Framework repository is currently inaccessible. Several other Microsoft projects, like ONNX Runtime, have also disappeared. It is not yet clear if these incidents are related.

Source: SecurityWeek

Sources & further reading

Featured image: Supply chain attack. Via original publisher. Image source

Exit mobile version