Data Security

Hackers Publish Malicious Versions of Microsoft Agent Framework on PyPI With Credential Stealer

According to an article on Security Week3, Microsoft Agent Framework, built for developing AI agents and multi-agent applications, saw roughly 190,000 downloads of the two malicious versions made available on the platform.

· 1 min read

By Tacilim Oréfice

According to Socket1, on November 17 the Microsoft agent-framework package published on PyPI was compromised, affecting versions 1.26.1 and 1.26.2. Both install Python startup hooks that silently collect credentials, environment data and cloud service identity tokens, sending that information to an address hosted on webhook[.]site. Socket also recommends that users avoid installing either of these versions and that anyone who has already installed one remove it and rotate any credentials that may have been exposed.1

A GitHub Advisory Database2 page describes the same issue and makes clear that the versions have been pulled from PyPI. The page includes a full technical description of how these versions were triggered. According to that description, the code runs immediately after the update package is installed, and it contains a control mechanism to prevent repeated executions and suppress any errors that might surface. Once running, the code begins collecting the computer name (hostname), the username, the working directory and the execution arguments, as well as a range of variables. Among those variables, the following words stand out: secrets, passwords, Azure and OpenAI.

According to an article on Security Week3, Microsoft Agent Framework, built for developing AI agents and multi-agent applications, saw roughly 190,000 downloads of the two malicious versions made available on the platform.

Like all the other sites that reported this security breach, they recommend that companies check their development environments, CI/CD pipelines and any identity or data files that may have been affected, and replace the packages with unaffected versions, such as the previous version 1.26.0 mentioned on the GitHub Advisory Database2 page describing the case. The breach has also made it necessary to replace any credentials that may have been exposed, investigate suspicious activity in cloud services and rebuild the affected environments.

  1. https://socket.dev/blog/agent-framework-pypi-package-compromised-with-credential-stealer
  2. https://github.com/advisories/GHSA-764m-3ppc-5m73
  3. https://www.securityweek.com/microsoft-agent-framework-releases-poisoned-with-credential-stealer/