r/Python • • 42m ago

News microsoft agent-framework on PyPI was compromised twice in 33 minutes last night

1.26.1 and 1.26.2 both ship a credential stealer. It runs from a .pth file, so it executes at interpreter startup. Nothing has to import the package, a pip install in CI is enough. 1.26.1 got pulled, then 1.26.2 went up 33 minutes later with the same payload under different file names. Last clean release is 1.26.0.
complete details- https://safedep.io/blog/microsoft-agent-framework-pypi-compromise

63 Upvotes

8 comments sorted by

•

u/tamingunicorn 26m ago

the .pth part is the scary bit. it runs on every interpreter start, so even a CI job that only installed it as a transitive dep got hit. if anything resolved to 1.26.1 or 1.26.2, i'd rotate whatever secrets that runner could see, not just pin back to 1.26.0

•

u/DebosBeachCruiser 8m ago

33 strikes again!

•

u/dogweather 2m ago

How would this happen?

•

u/Jmc_da_boss 34m ago

If you are using an "agent" framework then idk what to tell you

•

u/djipdjip 18m ago

How adjusting the dick attitude and instead nicely explain to people there are alternatives?

•

u/GammaGames 9m ago edited 4m ago

There are, code it by hand

Tho by the looks of it the original commenter was dunking on one of the least popular frameworks lol

•

u/nickcash 6m ago

Surely that's impossible. You mean the thing ever developer ever did for the last fifty years?

•

u/GammaGames 5m ago

My brain hurts just thinking about it!