Microsoft Agent Framework on PyPI compromised to steal secrets
Part of the Microsoft Agent Framework story · since 17 Nov
- Tue 17 Nov, 22:39 UTC. cybersixt, first report. Microsoft Agent Framework on PyPI compromised to steal secrets. This article, 1st of 1.
Two releases of agent-framework, the Python package for Microsoft Agent Framework, were published to PyPI on Tuesday 17 November with a credential stealer that does not exist in Microsoft's source code. Version 1.26.1 was uploaded at 20:35 UTC and, after it was taken down, version 1.26.2 followed at 21:08 UTC with a modified payload, according to Lidor Machluf of the cloud security firm Upwind Security, who reported the first in a GitHub issue on Microsoft's agent-framework repository at 20:54 UTC. A Microsoft member of the repository wrote in the same issue at 22:08 UTC that both "compromised versions" have been pulled from the package feed and that Microsoft is "actively investigating". When we checked late on Tuesday, the PyPI page listed the clean 1.26.0 as the latest version, and neither malicious release remained.
Upwind says the releases were uploaded outside Microsoft's release pipeline, most likely with a stolen PyPI upload credential. The repository has no tag for them, they shipped without the source archive every earlier release had, and the wheel had been repacked by hand rather than built by the project's tooling. Whether the credential has been revoked is unconfirmed, Upwind says. A researcher at the security company Aikido flagged the same release on X. agent-framework-core and four other agent-framework packages on PyPI that we checked showed no new releases on 17 November.
What the payload steals
The malicious versions add a .pth file, which Python runs every time the interpreter starts in that environment, not only when the package is imported.
According to Upwind's analysis, the payload starts a detached process that collects environment variables whose names contain words such as TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS and GITHUB; up to 60 credential files, including Azure CLI tokens, .npmrc, .netrc, .git-credentials, Docker and pip configuration and Hugging Face tokens; and the environments of up to 300 other processes.
It also requests Azure DevOps OIDC tokens and Azure managed-identity tokens for 12 resources, among them Azure Resource Manager, Microsoft Graph, Key Vault and Azure DevOps. Version 1.26.2 adds GitHub Actions OIDC tokens. Everything is compressed and posted to an address at webhook.site, a public request-capture service, which Upwind says anyone with the URL can read. Its hardcoded paths suggest it was aimed at hosted Azure DevOps build agents.
What to do
Upwind advises anyone who installed 1.26.1 or 1.26.2 to delete the startup files with a shell command before running pip, since pip itself would trigger the payload: agent_framework_meta.pth, af_runtime_diag.pth and af_runtime_diag.py under site-packages. Then reinstall agent-framework 1.26.0, preferably pinned by hash, rebuild images and clear the bad versions from pip, uv and CI caches and internal mirrors, because they can still be installed from there.
Treat every secret the affected machine or pipeline could reach as stolen and rotate it, including Azure DevOps service connections, managed identities and cloud keys. For GitHub workflows that exposed the Actions runtime token, Upwind suggests reviewing cache and artifact writes since 20:35 UTC and clearing the repository's Actions caches. Do not rely on "upgrade to latest" while the upload credential's status is unknown.
What is not known
Microsoft has not said how the upload credential was obtained, how many times the malicious versions were downloaded, or whether any of its own systems were affected. It has not published a security advisory.
How the story developed
1 article from 1 outlet since 17 Nov. Still developing; the latest report was 4 hours ago. This was the first report.
- Tue 17 Nov, 22:39 UTC. cybersixt, first report. Microsoft Agent Framework on PyPI compromised to steal secrets. This article, 1st of 1.
- No CVE
- Larger: an outlet’s first report
- Coverage over time
Show all 1 articles as a listHide the list
- Tue 17 NovDay 01
- Microsoft Agent Framework on PyPI compromised to steal secrets22:39 · cybersixt · First report · This article, 1st of 1
Sources
More reporting
- Journal Technologies court portal down after suspicious activity18 Nov
- Irish credit union cyber attack: members' payee details exposed17 Nov
- Equinor cyber attack: IT systems hit, production unaffected17 Nov
- DonorPerfect outage: security incident locks out nonprofits17 Nov
- EU sanctions NoName057(16) hackers over DDoS attacks on Europe17 Nov
Written by CyberSIXT from the sources above.How we reportCorrectionsRSS