AI Agent News/stories/microsoft-s-agent-framework-pypi-package-compromised-with-credential-stealer.md

FrameworksBreaking

Microsoft's agent-framework PyPI package compromised with credential stealer

Versions 1.26.1 and 1.26.2 of Microsoft's agent-framework package on PyPI were compromised with code that harvests credentials when Python starts. Socket says developers should remove both versions and rotate any credentials that may have been exposed.

Source: socket.dev/blog/agent-framework-pypi-package-compromised-with-credential-stealer

Socket's research team reports that both compromised versions install Python startup hooks through .pth files. The hooks launch a background collector that gathers credential-related environment variables, local Azure and CI configuration and credential files, and environments of other running processes. The collector also requests fresh Azure managed-identity and GitHub Actions OIDC tokens.

The collected data is serialized, compressed and Base64-encoded, then sent by POST to a webhook.site endpoint. Version 1.26.1 routes its payload through a package initializer, while version 1.26.2 uses a separate top-level module and restores the original initializer byte-for-byte, so checking only that file would miss it.

Socket advises against installing either version. Anyone who has them installed should remove them and rotate potentially exposed credentials, and the report lists file hashes and the network indicator for detection.

Why it matters if you build agents

Any agent environment that installed agent-framework 1.26.1 or 1.26.2 may have leaked Azure, GitHub Actions and other cloud or CI tokens during Python startup, not only when the agent ran.

Pinning versions and auditing .pth files in site-packages are practical checks for agent builds, since a normal import is not required to trigger the collector.

CI runners that use OIDC federation should be reviewed for token exposure, because the payload requests fresh federation tokens.

Get stories like this every weekday

One short email with the day's agent tooling news.

Subscribe