What it is
On 17 November 2026 two malicious versions of agent-framework, Microsoft's open-source Python package for building AI agents, were published to the PyPI package index. Versions 1.26.1 and 1.26.2 carried a credential stealer that ran every time Python started, even if the package was never imported. Elastic says PyPI removed both within the hour; JFrog gives 21:16 UTC and Wiz about 21:30 UTC. The last clean version is 1.26.0.
Anyone who installed either version on a developer workstation, a CI/CD runner or a container image is affected. No one needed to be tricked: JFrog reports that automated dependency update tools were opening upgrade requests within six minutes of publication. Wiz examined the 50 requests stored at the attacker's collection point and found three distinct cases of stolen victim data.
The stealer took passwords, keys and tokens from environment variables and credential files, and asked Azure for fresh cloud tokens. Elastic notes that those tokens are how a compromised build can reach the Azure subscription behind it. Removing the package is not enough: the sources say to treat every secret on an affected machine as stolen and replace it. Pinning versions and waiting before adopting new releases reduces exposure.
Who uses it: Unattributed: JFrog says it has not attributed the attack to a known threat group. Wiz reports that the attacker's tooling identified itself as Cairn, an open-source AI penetration-testing framework, and that the attacker appears to have compromised a client certificate and private key for Microsoft's publishing service, by means not yet known.
How it attacks
The sources list no ATT&CK technique IDs; every ID here is our mapping of the behaviour the sources describe.
| Stage | What it does | ATT&CK techniques |
|---|---|---|
| Initial access | Malicious versions 1.26.1 and 1.26.2 were published to PyPI under the genuine package name. JFrog says the attacker repacked the clean package locally rather than compromising Microsoft's build pipeline; Wiz says the attacker appears to have compromised a certificate and key for the Microsoft service that signs and publishes the package. | T1195.002 Supply Chain Compromise: Compromise Software Supply Chain |
| Execution and persistence | Each version added a .pth startup file, which Python processes every time it starts, so the stealer ran on every Python launch in that environment without the package being imported. It ran as a detached background process, so the theft added no visible delay. | T1546.018 Event Triggered Execution: Python Startup HooksT1059.006 Command and Scripting Interpreter: Python |
| Defence evasion | File names, a code comment and the web user agent were made to look like legitimate software telemetry. Version 1.26.2 restored the original package file and moved the stealer to new file names, so a search for the first version's file names alone misses it. | T1036 Masquerading |
| Credential access | The stealer read secrets from environment variables, including those of up to 300 running processes, and from Azure CLI, pip, npm, Docker, git and Hugging Face credential files, then requested Azure managed identity tokens from the instance metadata service. Only 1.26.2 requested GitHub Actions identity tokens; on Azure DevOps identity tokens, Elastic says it is unclear whether the request returned a usable token, and JFrog says real Azure DevOps endpoints reject it. | T1552.001 Unsecured Credentials: Credentials In FilesT1552.005 Unsecured Credentials: Cloud Instance Metadata APIT1528 Steal Application Access Token |
| Exfiltration | Everything collected was compressed, encoded and sent in one HTTPS POST to a single webhook.site address, with no fallback channel. Wiz confirmed the address was on the free tier and captured at most 50 requests; JFrog saw it returning a rate-limit error. | T1567.004 Exfiltration Over Web Service: Exfiltration Over WebhookT1560.002 Archive Collected Data: Archive via Library |
How to detect it
- Lockfiles, CI logs, virtual environments and container images: agent-framework 1.26.1 or 1.26.2 anywhere in lockfiles, CI logs, virtual environments or container images. Also check automated dependency update requests opened on 17 November and images built in that window.
- Python site-packages folders: The startup files agent_framework_meta.pth (1.26.1) or af_runtime_diag.pth (1.26.2). Wiz says any Python process started in an environment containing them ran the stealer.
- Proxy, DNS and firewall logs: Connections to webhook.site from build hosts and developer machines, and the user agents af-runtime-diagnostics/1 or runtime-diagnostics/1. Wiz notes that a 200 response means that host's data was accepted, and a 410 or 429 suggests it was rejected.
- Endpoint and cloud workload telemetry: A process started from an installed Python package reading secret files and then calling the cloud instance metadata service for tokens; Elastic lists rules for this pattern.
- Microsoft Entra ID sign-in and activity logs: Unexpected sign-ins or activity by managed identities and federated credentials that were reachable from affected machines or pipelines. Stolen tokens of this kind are valid for up to 24 hours.
- GitHub Actions workflow settings and runs: Workflows that installed 1.26.2 with permission to request identity tokens: Wiz says to treat those tokens as exposed and to review the Entra ID federated credentials that trust the workflow.
What reduces the risk
- Pin agent-framework to 1.26.0, the last clean version, and rebuild affected environments and container images from clean. M1051 Update Software
- Remove the startup files before running pip in an affected environment: JFrog warns that pip is itself a Python program, so starting it runs the stealer once more. M1042 Disable or Remove Feature or Program
- Replace every secret that was readable on an affected machine or runner, and revoke cloud sign-in sessions: JFrog notes that changing passwords or client secrets alone does not revoke cached refresh tokens. M1027 Password Policies
- Search internal package mirrors, caches, lockfiles and container images for the two versions and remove them. M1047 Audit
- Wait before adopting newly published package versions, and have a person review automated dependency update requests before they are merged. M1033 Limit Software Installation
- Block webhook.site from build hosts and servers where it is not needed. M1037 Filter Network Traffic
- Give build pipelines and managed identities only the cloud access they need, so a stolen token reaches less. M1026 Privileged Account Management
Sources
- We caught the agent-framework PyPI compromise six minutes after it published Elastic Security Labs, 18 November 2026
- Microsoft's agent-framework Hijacked on PyPI via Silent .pth Startup Hook JFrog Security Research, 18 November 2026
- Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines Wiz, 18 November 2026
Every statement was checked against the sources below on 2026-11-28. The technique and mitigation IDs are our mapping to MITRE ATT&CK of the behaviour the sources describe; the sources list none. Written by us from the public sources above, unlike the vulnerability entries, which are built by rule. General information, not advice for your systems.