- Socket reports that agent-framework versions 1.26.1 and 1.26.2 on PyPI were compromised on November 17. They sent Azure, GitHub Actions and CI/CD credentials to an outside address.
- The code ran whenever Python started and asked platforms for fresh identity tokens. SafeDep says rotating stored secrets does not cover those.
- Check whether any machine or pipeline installed either version, remove it, and rotate potentially exposed credentials, as Socket advises.
Installing it was enough
On November 17, Socket found that agent-framework, Microsoft's Python toolkit for building AI agents, had shipped two poisoned releases: 1.26.1 and 1.26.2. Both went to PyPI, the public Python package index.
Installing either release put code on the machine that runs whenever Python starts. Nothing had to import the package. That code collected credentials and sent them to an outside web address.
This incident shows how much a poisoned package can inherit. Code that runs at Python start borrows the identity of the machine it sits on.
What happened
The Hacker News reports that the two versions went up 33 minutes apart. Both have since been quarantined on PyPI.
The sources do not say how the attacker got publishing access. The Hacker News calls that unclear. They also do not say whether Microsoft's own systems were affected.
Agent-framework is the meta-package for Microsoft's open-source toolkit for building AI agents in Python. The Hacker News puts its traffic at roughly 190,000 downloads a month. That counts downloads, not victims. The sources do not say how many systems installed the bad versions.
How the startup hook works
Socket explains that each version adds a .pth file to Python's package folder. Python reads these files at launch and runs any import line inside them. So the stealer starts with Python, even if no program uses the package.
Endor Labs, quoted by The Hacker News, says this includes pip itself. Socket adds that collection runs in a background process and that the code hides errors. Socket found no marker left on disk, so a new process tree can start collection again.
The second release hides differently. It keeps the payload in a new file, af_runtime_diag.py, and leaves the original package file clean. Socket warns that a check of agent_framework_meta/__init__.py alone would find nothing.
It asks for new keys, not only old ones
Socket says the collector looks for environment variable names containing words such as TOKEN, SECRET, KEY, AZURE, AWS, GITHUB and OPENAI. It also reads the environments of other running processes. It checks credential files too, including pip, npm, Git, Docker and Hugging Face settings.
Then it asks for more. Socket says it requests tokens from Azure's managed-identity endpoint and uses Azure DevOps pipeline variables to request federation tokens. Version 1.26.2 adds GitHub Actions OIDC tokens. An OIDC token is short-lived proof that a build job can show to a cloud provider.
SafeDep stated the consequence plainly: "Rotating stored secrets does not cover those."
Socket says the stolen data is compressed, Base64-encoded and posted to a webhook.site address. The encoding adds no protection beyond HTTPS. The researchers report that the payloads do not download or run more code.
Where the risk sits
The sources describe what the stealer targets. They do not say where teams usually install the package. But wherever it lands on a build runner or a cloud-connected machine, the stealer finds identities to ask for.
OX Security described the case as an attack on AI developer tooling and the build pipelines behind it. It said attackers seem to have tampered with the wheel creation flow. That is the step that packages a release.
The Hacker News counts this as the second Microsoft-related PyPI package compromised this year. The earlier case it cites is durabletask, a Microsoft Python library that connects to the Durable Task workflow system. The outlet says a group called TeamPCP pushed three bad versions of it in May 2026. The sources say nothing more about a link between the two cases.
The cost lands on platform and security teams. They must work out what ran, where, and with which identity.
What to ask your team
Socket's advice is direct. If either version is installed, remove it and rotate potentially exposed credentials. Leaders can then ask four questions.
First, did any laptop, server or pipeline install 1.26.1 or 1.26.2? Lockfiles and build logs will say. Second, which cloud identities could those machines reach? Third, given SafeDep's point, which tokens could these pipelines and managed identities have requested, and can we review their use in the logs? Fourth, do install steps need open network access and live cloud identity at all?
A compromised package that runs at Python start inherits whatever identity the machine holds. The answers to these questions show how much that was.
Produced by the WebPulse Newsroom with AI assistance from the original reporting credited below, and checked against that source by our editorial review. How we use AI.
Original reporting: Socket.





