Security
Microsoft’s Agent Framework package on PyPI was briefly replaced by two malicious versions that ran a credential stealer every time Python started
Two malicious Agent Framework releases on PyPI (1.26.1, 1.26.2) installed a startup hook stealing cloud and CI/CD credentials.
Versions 1.26.1 and 1.26.2 of the agent-framework package were published to PyPI on November 17, 33 minutes apart, and both were removed within about an hour. They were not built from Microsoft’s repository, per a maintainer reply on GitHub.
The essentials
- Window: 1.26.1 appeared at 20:35 UTC and 1.26.2 at 21:08 UTC on November 17; both were gone by about 21:30 UTC, per Wiz and BleepingComputer.
- Mechanism: a .pth file named agent_framework_meta.pth makes Python run a stealer at every interpreter start, with no import needed, per Socket.
- Targets: Azure, GitHub Actions and other CI/CD and cloud tokens, sent to a webhook.site endpoint, per Wiz.
- Safe version: 1.26.0 is the last release not flagged; anyone who installed 1.26.1 or 1.26.2 should rotate secrets reachable from that machine.
What a .pth hook changes
Python reads .pth files in site-packages at startup, and lines starting with import are executed. That is why installing the package was enough: no code needed to import it. Removing the package does not undo what already ran, so the safe step after exposure is rotating the credentials, not only uninstalling.
How it got there
The GitHub issue on the Microsoft repository says the files did not come from its build pipeline. The sources we checked suggest a compromised publishing credential but none confirms it.
What is not established
- How the attacker got upload rights: not stated in the sources.
- Number of machines that installed the bad versions: not published.
- Whether data was actually received: not stated.
Summary table
| Point | What is stated as of November 18, 2026 | Source |
|---|---|---|
| Malicious versions | 1.26.1 and 1.26.2 | BleepingComputer |
| Last safe version | 1.26.0 | Wiz |
| Exfiltration | webhook.site endpoint | Wiz |
| Typical use | About 41,000 downloads a week | Wiz |
FAQ
Am I affected?
If you installed or upgraded to 1.26.1 or 1.26.2 on November 17, yes. Check with pip show agent-framework and your pip logs.
What should I rotate?
Per Wiz and Socket, Azure, GitHub Actions and cloud tokens reachable from the machine or CI runner.
Sources
- BleepingComputer: Microsoft’s Agent Framework PyPI package compromised to steal credentials (verified 2026-11-18)
- Wiz: Malicious version of Microsoft’s Agent Framework published to PyPI (verified 2026-11-18)
- Socket: Agent Framework PyPI package compromised with credential stealer (verified 2026-11-18)
- The Hacker News: Attackers compromise Microsoft’s Agent Framework (verified 2026-11-18)
- GitHub: microsoft/agent-framework issue 10411 (verified 2026-11-18)
Spotted an error in this article? Report it · Our corrections policy