What happened
On 17 November, versions 1.26.1 and 1.26.2 of agent-framework, Microsoft's Python package for building AI agents, were published to PyPI with a credential stealer targeting Azure, Azure DevOps and GitHub Actions secrets1. Both have been removed, and Microsoft has said it is investigating2. Wiz identifies 1.26.0 as the latest safe version3.
Two details matter more than the headline. The releases appeared under the legitimate publisher rather than a lookalike name, and JFrog reports the attacker repacked the clean release rather than compromising Microsoft's build, which points to stolen publishing credentials4. And the two malicious versions went out within about half an hour of each other, the second moving the payload to a new file5. Anyone whose tooling upgraded automatically in that window got it.
Why installing was enough
The payload was delivered through a .pth file. Python's site module processes these path configuration files at start-up, and executes any line that begins with import6. It is a documented feature meant for setting up paths. It also means any installed package can run code every time Python starts, in every script, test run and notebook in that environment, without ever being imported4.
- PublishAttacker uploads a repacked release under the real publisher
- ResolveAn unpinned or loosely pinned install picks up the new version
- DropInstallation writes a .pth file into site-packages
- RunAny Python process on that machine executes it at start-up
- HarvestCloud, CI and token secrets are read from the environment and files
- ExfiltrateSecrets leave before anyone has imported the package
That changes the usual reasoning about risk. Teams often assume a dependency is only dangerous on the code paths that call it. Start-up hooks, install scripts and build plugins break that assumption: the risk is in the environment, not the call graph.
Why agent tooling is the target
Agent frameworks are installed where the valuable credentials are. Developers run them on laptops signed in to cloud consoles; CI pipelines run their tests with deployment credentials loaded; agents themselves are often given broad tokens so they can call tools. A package that sits in those environments is worth more to an attacker than almost any library in production, where secrets are usually narrower and better managed.
They are also young, fast-moving and upgraded eagerly. Teams building with agents want the newest release, so loose version ranges and automatic updates are common. That is exactly the window this attack used.
What to change in CI and developer environments
The CNCF's software supply chain paper treats build infrastructure as needing the same security as the production it builds for, and recommends single-use build workers so a compromise cannot persist or spread across builds7. Most of the fixes here follow from taking that seriously.

| Control | What it stops | Cost |
|---|---|---|
| Lockfiles with hashes for every install | Silently picking up a new release | Low; needs a routine for updates |
| A cooling-off period before new releases are allowed | Installing a release in its first hours, when most poisoned versions are caught | Low; small delay on fixes |
| Separate install and secret-holding steps in CI | Start-up hooks reading deployment credentials during tests | Medium; pipeline changes |
| Short-lived, narrowly scoped CI credentials | Stolen secrets being useful for long or broadly | Medium; identity federation work |
| Single-use build workers | A compromise persisting across builds | Medium; often already available |
| Internal package mirror with policy | Unreviewed packages reaching any environment | Higher; worth it at scale |
The most effective single change is keeping deployment credentials out of any step that installs or runs third-party code. Tests do not need the keys to production.
For developers, the equivalent is not running agent experiments in the same environment, or with the same signed-in cloud session, as production administration. A disposable container or virtual environment with no standing credentials costs little and limits what a poisoned package can find.
If you installed an affected version
- Find it: search lockfiles, CI logs and package caches for agent-framework 1.26.1 or 1.26.2.
- Assume every credential reachable from those machines and runners is exposed, not just Azure and GitHub; reports describe the stealer reading environment variables and local configuration more broadly2.
- Rotate first, then investigate: review cloud audit logs and CI histories for use of those credentials since 17 November.
- Rebuild affected environments rather than cleaning them, and pin to a verified version.
The CTO's take
This is the same lesson as the recent vendor access incidents, one layer down: trust granted for convenience becomes access for attackers. Package registries are run by the publishers you depend on, and their credentials can be stolen like anyone's. The defence is to assume a dependency will eventually be poisoned and design so that, when it happens, it finds nothing worth taking. Related reading: AI model supply chain security, the runtime inventory case study and the tech news for 19 November.
If you want a review of how your CI and agent tooling handle secrets, or a technical due diligence view of a team's supply chain, I am a fractional CTO and AI architect based in India, the United States and the UAE, working globally. You can analyse your challenge and bring the result to a call.
- 1Microsoft Agent Framework Releases Poisoned With Credential StealerSecurityWeek · Nov 2026
- 2Microsoft's agent-framework PyPI package compromised to steal credentialsBleepingComputer · Nov 2026
- 3
- 4Microsoft's agent-framework hijacked on PyPI via silent .pth startup hookJFrog Security Research · Nov 2026
- 5Two malicious agent-framework releases hit PyPI in 33 minutesAikido · Nov 2026
- 6site: Site-specific configuration hookPython documentation
- 7Software Supply Chain Best PracticesCNCF TAG Security