Skip to content

Response, New York. Noah Park: Check Point Patches Actively Exploited Management Server Path Traversal. Detection, Dallas. Ava Okello: Report Finds Nearly Half of Deployed Detections Need Attention Before SOCs Can Trust Them.

SOCtember

Always First. Fast SOC News.

StepSecurity graphic headed Threat Intelligence: agent-framework 1.26.1 and 1.26.2 Compromised on PyPI, describing an official Microsoft package that ships a credential stealer as a .pth startup hook that runs on every Python interpreter start, with zero imports needed to execute.
Image: StepSecurity (fair use). Cover graphic from the StepSecurity analysis of the agent-framework compromise, published Nov. 18, 2026.

Response

Two Poisoned Releases of Microsoft's agent-framework on PyPI Ran a Credential Stealer Every Time Python Started, Minting Azure and GitHub Actions Identity Tokens, and the Second Went Up Minutes After PyPI Pulled the First

Versions 1.26.1 and 1.26.2 of the AI agent package, which gets about 41,000 downloads a week, planted .pth startup hooks that harvested CI, cloud and registry secrets and posted them to webhook.site. Researchers say to isolate affected environments before running Python or pip, rebuild on 1.26.0 and rotate every secret the payload could reach.

Noah Park, ResponseNew York6 min read

NEW YORK - Someone with publishing access to Microsoft's agent-framework project on the Python Package Index uploaded two malicious releases on Tuesday that stole cloud and build-pipeline credentials from any environment where they were installed, and kept publishing after the registry quarantined the first one, according to analyses by Wiz, StepSecurity and others.

Version 1.26.1 of agent-framework, the umbrella package for Microsoft's open-source framework for building AI agents in Python, went up at 20:35 UTC on Nov. 17, Wiz said. StepSecurity said PyPI quarantined it at 21:06:16 UTC and that version 1.26.2 appeared at 21:08:39, 2 minutes and 23 seconds later, before it too was quarantined at 21:16:44. "This demonstrates that quarantining the first release did not immediately revoke the attacker's publishing access," StepSecurity wrote, adding that the evidence does not show whether that access remains.

The package gets about 41,000 downloads a week, according to Wiz. The last clean version is 1.26.0, released Nov. 12.

PyPI banner for agent-framework 1.26.2 reading Quarantined: This release has been quarantined by PyPI admins. It cannot be installed or modified until a security review is complete. Consider using release 1.26.0 instead.
Image: StepSecurity (fair use).The PyPI quarantine notice on agent-framework 1.26.2, as captured by StepSecurity.

No import required

Both releases dropped 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 those files whenever the interpreter starts, so the stealer runs on any later launch of Python in that environment, whether pytest, a build script, a linter or pip itself, even if nothing imports agent-framework. The code was dressed up as telemetry, with names such as _telemetry and the user agents af-runtime-diagnostics/1 and runtime-diagnostics/1, and it forks into a detached session so nothing appears on screen.

The stealer collects environment variables whose names suggest secrets, scrapes secret-looking values from up to 300 other processes' /proc environ files, which on a build machine can include the CI runner, and grabs up to 80 credential files, among them Azure CLI token caches, .npmrc, pip.conf, .netrc, .git-credentials, Docker config and Hugging Face tokens. It also tries to mint fresh identity tokens: Azure managed-identity tokens for 12 resources including Azure Resource Manager, Graph, Key Vault and Storage; Azure DevOps OIDC tokens; and, in 1.26.2, GitHub Actions OIDC tokens for api://AzureADTokenExchange and https://management.azure.com/ in workflows granted id-token: write. Everything goes out in one compressed POST to a hardcoded webhook.site URL.

Version 1.26.2 also renamed its files and restored the package's __init__.py to the clean 1.26.0 content, so "searching only for the 1.26.1 file names will miss this version," Wiz warned.

How it got there is not settled

The root cause has not been confirmed. Wiz said there is no matching tag or release in the microsoft/agent-framework GitHub repository, the main branch does not contain the malicious code, and the bad versions were wheel-only uploads, unlike legitimate releases, which ship a wheel and source distribution together with agent-framework-core. StepSecurity said both wheels carried the uploader user agent RestSharp/106.13.0.0 and no provenance attestation, and its timeline notes a maintainer account named vibiret created and added to the project on Nov. 17. Wiz noted that another Microsoft Python package, durabletask, was compromised earlier this year after its PyPI token was stolen, but said it has not linked the two.

PyPI release history for agent-framework showing versions 1.26.2 and 1.26.1 marked Release Quarantined with one release file and no provenance each, above 1.26.0 from Nov. 12 and 1.25.0 from Nov. 7 with two release files each.
Image: StepSecurity (fair use).The agent-framework release history on PyPI, as captured by StepSecurity.

One limit on the damage: the attacker used a free-tier webhook.site URL, which accepts at most 100 requests and expires after seven days. Wiz said a maximum of 50 requests were captured, but warned that those requests can contain working cloud, CI and registry credentials.

What responders should do

StepSecurity's first step is containment before inspection: isolate affected hosts, containers and runners, and do not start with pip uninstall, pip show or any Python command in the affected environment, because interpreter startup can run the hook again. Then rebuild from a clean base pinned to 1.26.0 with a hash-pinned lockfile, block 1.26.1 and 1.26.2, and purge cached artifacts and images, since quarantine does not remove copies already downloaded.

Hunt in lockfiles, CI logs, virtual environments, internal mirrors and container images for the two versions, and in site-packages for agent_framework_meta.pth, agent_framework_meta/_telemetry.py, af_runtime_diag.pth and af_runtime_diag.py. In proxy and DNS logs, search for webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb and the two user agents; Wiz says a 200 response means the host's data was accepted, while 410 or 429 suggests it was rejected.

Rotate every secret that was in the environment, plus Azure CLI sessions, Azure DevOps personal access tokens and service connections, package registry, Docker, Hugging Face and Git credentials. Review sign-in and activity logs for managed identities and federated credentials reachable from affected VMs, App Services, AKS nodes and pipelines; Wiz notes stolen managed-identity and OIDC-exchanged tokens stay valid for up to 24 hours, and StepSecurity cautions that rotating static secrets does not necessarily invalidate tokens already issued.

About the Author

Noah Park

Noah Park covers incident response, containment, and blue-team operations for SOCtember from New York.

Related stories

Response desk