Microsoft Agent Framework Compromised on PyPI in Major Supply Chain Attack


microsoft x account hacked
Image credit: Microsoft

Hackers compromised Microsoft’s official Agent Framework package on PyPI and published two malicious versions designed to steal cloud credentials, API keys, and other sensitive developer information.

The attackers released versions 1.26.1 and 1.26.2 on November 17, 2026, exposing developers who installed the affected packages to credential theft.

Security researchers at Socket, Step Security, and Ox Security investigated the incident and identified malware hidden inside the releases.

Malicious Microsoft Agent Framework updates target cloud credentials

The malicious packages contained code that executed automatically during Python startup, meaning developers did not need to import Agent Framework to trigger the malware.

The attackers targeted credentials and authentication tokens associated with Microsoft Azure, Azure DevOps, Amazon Web Services (AWS), GitHub, GitHub Actions, Docker, Hugging Face, and OpenAI.

The malware also attempted to collect environment variables, configuration secrets, and credentials from running processes.

Both malicious versions retained the legitimate agent-framework-core 1.26.0 dependency, allowing Agent Framework to continue functioning while the malware collected sensitive information in the background.

The attackers configured the malicious code to send stolen information to an attacker-controlled webhook endpoint.

Attackers published another malicious version after PyPI quarantine

The first compromised release, Agent Framework 1.26.1, contained a malicious .pth file that triggered code execution when Python started.

PyPI quarantined the initial release, but the attackers subsequently published version 1.26.2, which also contained credential-stealing malware.

The second release suggests the attackers retained publishing access even after PyPI identified the initial malicious package.

Researchers have not yet established how the attackers obtained access to Microsoft’s official PyPI project or whether the compromise involved stolen credentials or another publishing mechanism.

Developers should remove compromised versions and rotate credentials

Developers who installed Agent Framework versions 1.26.1 or 1.26.2 should consider their development environments potentially compromised.

Security researchers recommend several immediate actions:

  • Isolate affected systems to prevent further credential theft.
  • Rebuild compromised environments from a known-clean state using the safe Agent Framework 1.26.0 release.
  • Rotate cloud credentials, API keys, and access tokens that the malware may have accessed.
  • Review network logs for connections to the attacker-controlled webhook endpoint.
  • Investigate potential unauthorized activity across Azure, AWS, GitHub, and other connected services.

Developers should also determine whether security controls blocked the malware’s attempts to transmit information or whether sensitive data actually reached the attackers.

The incident highlights how attackers can exploit trusted software distribution channels to compromise developer environments and gain access to cloud infrastructure without disrupting legitimate application functionality.

The compromise comes as Microsoft continues expanding its AI development tools, including new GitHub Copilot browser automation features for Chrome and Edge.

Meanwhile, Microsoft has strengthened protection for fresh Windows installations with updated Defender security definitions. Security researchers have also identified new BubbleLoader malware that disguises itself as popular Windows applications, including WinRAR, Firefox, and Windows Media Player.

Via BleepingComputer

More about the topics: Cybersecurity, microsoft

Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

User forum

0 messages