Renovate Opened the Upgrade PR in Six Minutes: Microsoft's Poisoned agent-framework Shows Auto-Updates Now Race the Attacker

Renovate Opened the Upgrade PR in Six Minutes: Microsoft's Poisoned agent-framework Shows Auto-Updates Now Race the Attacker
Two malicious releases of Microsoft's agent-framework stayed on PyPI for about 40 minutes, yet bots had already started pulling them in, which shows that a trusted publisher name and fast dependency automation are now the attacker's delivery system.
What happened, briefly
On 17 November, two releases of Microsoft's official agent-framework Python package showed up on PyPI that never came from Microsoft's source repository. Version 1.26.1 was published at 00:35 Mauritius time on 18 November (20:35 UTC on 17 November), and version 1.26.2 followed at 01:08 Mauritius time (21:08 UTC). According to the GitHub Advisory Database entry GHSA-764m-3ppc-5m73, both carry a credential stealer that is not in 1.26.0, the last clean release. Both have since been removed.
The package gets roughly 190,000 downloads a month. It is the Python entry point for Microsoft's framework for building AI agents. Those are exactly the environments that tend to hold cloud credentials, LLM API keys and CI tokens at the same time.
The technical write-ups have already covered the mechanics in detail. This piece is about what the timeline tells us, because the timeline is the uncomfortable part.
The 40-minute window was long enough
Researchers who rebuilt the timeline say Renovate bots were opening upgrade pull requests in downstream repositories within six minutes of 1.26.1 appearing. PyPI quarantined 1.26.1 at 01:06 Mauritius time (21:06 UTC). Two minutes later, 1.26.2 was live. Both were gone by about 01:16 Mauritius time (21:16 UTC).
There are two lessons here.
- Automation is faster than detection. Dependency bots exist to shrink the time between a release and its adoption. That is the right call for security patches. It is also exactly what an attacker wants. A bot that opens a PR, and a CI job that installs the PR branch to run tests, executes the payload before any human has looked at it.
- Quarantining a version is not revoking an identity. Removing 1.26.1 did not stop the attacker publishing 1.26.2 two minutes later. Whatever credential or signing path was used still worked. Incident response that works one artifact at a time loses to an attacker who can simply publish again.
"Never imported, still ran"
The payload's delivery choice matters for defenders. Each malicious wheel drops a .pth file into the root of site-packages: agent_framework_meta.pth in 1.26.1 and af_runtime_diag.pth in 1.26.2. Python processes .pth files every time the interpreter starts, so the stealer runs whenever Python starts in that environment. That includes a test runner, a linter, a notebook kernel, or pip itself. Nobody has to import the framework.
The stealer forks into the background and stays quiet about errors. It collects environment variables whose names match patterns such as TOKEN, SECRET, KEY, AZURE, AWS, GITHUB and OPENAI, plus secrets it finds in other processes' environments. It also reads credential files such as Azure CLI caches, .npmrc, .netrc, .git-credentials and Docker configs, along with .env files in container paths. On Azure hosts it asks the instance metadata service for managed-identity tokens covering Resource Manager, Key Vault, Storage, Graph and Azure DevOps. Version 1.26.2 added GitHub Actions OIDC tokens. Everything is compressed, base64-encoded and sent in one POST to a webhook[.]site URL.
The real framework code is still there, so applications keep working. That is why "the build passed" tells you nothing.
The odd detail: a free-tier webhook capped the damage
One research team analysed the exfiltration endpoint and found it was on a free tier that accepted only a limited number of requests. Of the 50 captured requests, they attribute 4 to the attacker's own testing and 29 to sandboxes and security scanners. The remaining 17 represent just three unique, successful thefts of victim data.
Read that carefully. It does not mean only three organisations were affected. Once the cap was reached, later sends would have failed silently, so the true number cannot be known from the webhook alone. What it does show is that the damage was limited by the attacker's own sloppy infrastructure, not by any defensive control. The next attacker will pay for a proper endpoint.
How did it get published? Nobody knows yet
This is where the facts are thin, and it is worth being honest about that.
- The malicious versions contained only built wheels, with no source distributions, and no matching code exists in Microsoft's repository. Researchers agree they were built outside the normal release pipeline.
- One research team says the attacker "appears to have compromised" a client certificate and key for Microsoft's internal Engineering System Release Pipeline (ESRP). It reports that a first publish attempt from AWS was blocked by IP filtering, and a second from Microsoft-owned IP space succeeded. That is an inference from captured artifacts, not a confirmed root cause.
- Others point to a likely account or token compromise, mainly because a second version appeared after the first was quarantined.
- According to researchers, the attacker's tooling reported its progress to the same public webhook and identified itself as "Cairn", described as an open-source AI penetration-testing framework running on a GLM-family model. If that holds up, it is another sign that agentic tooling is now driving real supply-chain operations, not just red-team demos.
A framework maintainer has acknowledged the incident in a GitHub discussion and said an investigation is under way. Microsoft has not yet published a root cause. Until it does, treat every explanation above as provisional.
The bigger point: the publisher name was the exploit
Most PyPI malware relies on typosquats and look-alike names that careful teams have learned to catch. This attack needed none of that. It came under the right name, from the right publisher, with a plausible patch-level version bump. Every control that asks "is this the real package?" said yes.
AI agent frameworks make this worse in a structural way. An agent runtime is designed to hold the keys to many systems at once: model providers, vector databases, cloud resources and source control. Compromising one dependency in that stack is a very efficient way to collect credentials.
Practical takeaways
- Check for exposure now: search lockfiles, CI install logs, container images and internal mirrors for
agent-framework1.26.1 or 1.26.2, and look for Renovate or Dependabot PRs opened on 17–18 November. - Look for the hooks on disk:
agent_framework_meta.pth,agent_framework_meta/_telemetry.py,af_runtime_diag.pthandaf_runtime_diag.pyin site-packages. Researchers warn that running a barepip uninstallin an infected environment can trigger the payload again. Set_AF_TEL=1first, or remove the files manually, or rebuild the environment from scratch. - Rotate everything reachable: environment secrets, Azure CLI sessions, Azure DevOps PATs and service connections, registry tokens (npm, PyPI, NuGet, Docker, Hugging Face), git credentials and LLM API keys. Managed-identity tokens can't be revoked and can stay valid for up to 24 hours, so recycle affected compute and review sign-in logs.
- Pin to 1.26.0 with hashes, not a loose
>=1.26range. - Add a cooling-off period to dependency bots: a minimum release age of a few days for non-security updates (Renovate supports
minimumReleaseAge) would have kept this release out of most repositories entirely. - Don't run untrusted bot PRs with secrets: CI jobs triggered by dependency-update branches should not get cloud credentials or OIDC
id-token: writepermissions. - Restrict egress from build runners: a runner that can POST to any paste or webhook site gives a stealer a free exit. Block such services where they aren't needed.
# Look for the malicious hooks WITHOUT starting Python in a suspect environment
find / -path /proc -prune -o \( -name 'agent_framework_meta.pth' -o -name 'af_runtime_diag.pth' -o -name 'af_runtime_diag.py' \) -print 2>/dev/null
# Search lockfiles in your repositories for the bad versions
grep -rnE 'agent[-_]framework[^-]*(==|@ ?)1\.26\.[12]\b' --include='*.txt' --include='*.lock' --include='pyproject.toml' .
