Malicious Code Stealing Credentials Found in Some Versions of Microsoft's AI Development Tool
Malicious code that steals credentials has been discovered in some versions of Microsoft's AI development tool. Two problematic versions, 1.26.1 and 1.26.2, registered on PyPI for Microsoft's open-source AI development tool, the 'Microsoft Agent Framework' — which anyone is free to use and modify — were found to contain malicious code that steals credentials used to access cloud accounts.
According to analyses by security firms including StepSecurity, the two versions were published on PyPI, the Python package repository, on the 17th (local time) and remained downloadable for about an hour from 5:35 a.m. Korean time on the 18th. According to security firm Aikido, version 1.26.1 was registered at 8:35 p.m. UTC on the 17th and version 1.26.2 at 9:08 p.m. the same day; both were subsequently quarantined and removed from PyPI. The last legitimate version cited by security firms is 1.26.0, released on November 12.
Irregularities were also found in the management of the publishing account. According to StepSecurity's analysis, the package had been managed by a Microsoft organization account, but a new administrator account named 'vibiret' was added on the same day the malicious versions were published. The account was created that very day and was also registered as an administrator on five other related packages.
The distribution method also showed anomalies. The problematic versions included only installation files known as wheels, with no source distribution, and no proof of origin indicating they had gone through the official release process was verified. Wiz explained that it has not been determined how publishing privileges were obtained. The attacker re-registered a second version even after the first malicious version was quarantined, leading StepSecurity to suggest that the attacker likely retained publishing privileges at the time. Whether the existing management accounts were directly compromised also remains unconfirmed.
The malware exploited Python's '.pth' file processing mechanism. Python reads '.pth' files in certain paths and executes some commands when programs start, and the attacker abused this feature. It was designed so that malicious commands would run as the Python execution environment starts, even if the development tool was never directly imported, making the infection difficult to detect.
The data targeted for collection was confirmed to be of various types. It searched environment variables based on about 35 keywords, and also scanned for credential files stored in Azure command-line tools, Azure DevOps, pip, npm, Git, Docker, and Hugging Face. According to StepSecurity, the first version was built to collect up to 60 credential-related files and the second up to 80, and both included a function to inspect environment variables of up to 300 other running processes. The second version added a function to obtain OIDC authentication tokens from GitHub Actions, and the collected data was compressed and encoded before being sent to an external address linked to the public webhook service 'webhook.site'.
Security firms warned that even though the malicious versions were removed from the repository, environments where they were already installed need to be inspected and credentials replaced. Given that the very act of trusting and installing from a legitimate project's distribution channel can be exploited as an attack vector, the incident serves as a renewed reminder of the risks of software supply chain attacks.
