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.

By ·

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

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

Summary table

Summary table
PointWhat is stated as of November 18, 2026Source
Malicious versions1.26.1 and 1.26.2BleepingComputer
Last safe version1.26.0Wiz
Exfiltrationwebhook.site endpointWiz
Typical useAbout 41,000 downloads a weekWiz

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

Spotted an error in this article? Report it · Our corrections policy

OrigoTech logo

New: the app iPhone & iPad

OrigoTech is now an iPhone and iPad app

Read the articles natively, with “New” markers on unread ones, local search and offline reading of what you have already loaded. Free, no account, iOS 17 or later; ads appear between articles.

Rekha icon: a house drawn in a single stroke

From the same author Self-promotion

An Eulerian path, drawn with your finger

Rekha, the iPhone game by OrigoTech's author: connect every dot in a single stroke without tracing the same link twice, across 500 drawings that are all solvable.

The OrigoTech newsletter

A sourced weekly digest of AI tool news.

Read next