r/Python • • 17d 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

461 Upvotes

57 comments sorted by

View all comments

Show parent comment

25

u/HexDecimal 17d ago

Can also set environment variables globally, for example PIP_UPLOADED_PRIOR_TO=P3D, to make cooldowns the default for pip.

uv also has UV_EXCLUDE_NEWER=7 days, etc.

1

u/zurtex 17d ago

FYI uv and pip (26.1+) both accept the same PnD syntax, so you can use P3D or P7D for both.