AI Risk Wire

Cases › security breach › LR-2026-0904

Malicious agent-framework 1.26.1 and 1.26.2 uploaded to PyPI (Microsoft Agent Framework)

Developing: a major or severe case captured in the last 72 hours. Later changes are logged on the corrections page.

Who did it
Outside attacker
Who was hit
Anyone who installed agent-framework 1.26.1 or 1.26.2 in the window, including CI pipelines, developer laptops and Azure VMs with a managed identity attached
AI product
Microsoft Agent Framework
AI company and model
Microsoft
How it was found
Third party
Reported
17 Nov 2026
Severity
Major
  1. The system is Microsoft's agent-framework Python meta-package on PyPI, used to build AI agents. Its malicious releases ran in developer, CI and Azure environments that installed them.
  2. Two uploaded versions dropped a .pth file that ran a credential stealer on every Python start, even without importing the package. They sent collected secrets to webhook.site, and 1.26.1 appears to have bypassed the project's release process.
  3. The stealer targeted Azure and Azure DevOps credentials on any host that installed either version. On the attacker's free-tier token, a maximum of 50 requests were captured.
  4. Endor Labs, an outside security vendor, detected both malicious packages within three minutes of publication.

Source: Wiz · 2 more

What was done

Both malicious versions were gone from PyPI by 21:30 UTC. Users were advised to pin 1.26.0 and rotate exposed credentials.

Fix reported: “Block agent-framework 1.26.1 and 1.26.2 in package proxies or allowlists, pin to a hash-verified version, and rotate credentials the process could read or request” · Short-lived, scoped credentials

Risks Supply-chain compromise (21 incidents) · AI system attacked or breached (54 incidents)

No source states: money lost or records, tools it had, company using the AI, sector.

Similar incidents

All cases of this kind ›

Evidence

Sources (3)

  1. Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines · Wiz · 2026-11-17
  2. agent-framework compromised: Python startup hooks steal Azure and CI credentials | Endor Labs · Endor Labs · 2026-11-17
  3. Two malicious agent-framework releases hit PyPI in 33 minutes · Aikido Security · 2026-11-17
Show the full account: 27 items from the primary sources

What happened, in order

  1. 2026-11-12 18:25 UTC The last legitimate release, 1.26.0, was published on 2026-11-12 at 18:25 UTC as a wheel plus sdist alongside agent-framework-core 1.26.0.
  2. 2026-11-17 20:35 UTC Malicious agent-framework 1.26.1 was uploaded to PyPI at 20:35 UTC on November 17, 2026.
  3. 2026-11-17 21:08 UTC A second malicious version, 1.26.2, was uploaded at 21:08 UTC, and by 21:30 UTC both versions were gone from PyPI.
  4. 2026-11-17 21:08 UTC 1.26.2 came 33 minutes after 1.26.1 and was a repacked version of it that reported to the same webhook.site URL.

Who and what was involved

  1. The targeted package is Microsoft's agent-framework on PyPI, which gets about 41,000 downloads a week. The most recent safe version is 1.26.0.
  2. earlier in 2026 Wiz notes that another Microsoft Python package, durabletask, was compromised earlier in the year after its PyPI token was stolen, but it has not linked the two incidents.

What they used to do it

  1. On install, the malicious package drops a .pth file in site-packages root, which Python runs on every interpreter start. The stealer therefore runs even if agent-framework is never imported.
  2. In 1.26.1 the .pth file imports agent_framework_meta, whose __init__.py calls _telemetry._start(). The stealer forks into a detached session, or uses a daemon thread where fork is unavailable.
  3. The stealer collects environment variables whose names contain strings such as TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS and GITHUB.
  4. It also reads secret-looking values from the environments of other processes, up to 300 /proc/*/environ files.
  5. If Azure DevOps variables SYSTEM_ACCESSTOKEN and SYSTEM_OIDCREQUESTURI are set, the stealer requests an OIDC token for api://AzureADTokenExchange.
  6. It steals Azure managed-identity tokens from IMDS or the App Service identity endpoint, covering 12 resources including ARM, Graph, Key Vault and Storage.
  7. All collected data is placed in one JSON document, zlib-compressed, base64-encoded and sent in a single HTTPS POST to webhook.site. The URL is hardcoded with no fallback channel.
  8. Version 1.26.2 steals GitHub Actions OIDC tokens in workflows with id-token: write. Where an Entra ID federated credential trusts the workflow, the tokens can be exchanged for Azure access without a stored secret.
  9. 1.26.2 widened collection by adding ACTIONS, OIDC, RUNNER and ARM_ env matching and GitHub runner paths. It also raised the file cap from 60 to 80.
  10. 1.26.2 changed its trigger: __init__.py was restored to the clean 1.26.0 file, and a new top-level af_runtime_diag.pth imports af_runtime_diag.py, which starts the stealer.

What they did to avoid being caught

  1. The file and function names and user-agent were chosen to look like legitimate SDK telemetry.
  2. The stealer detaches into its own session and sets _AF_TEL=1 so child processes do not run it again.
  3. Exfiltration failures are silently ignored and not retried.
  4. Because 1.26.2 uses different file names, searching only for the 1.26.1 file names would miss it.

What made it possible

  1. Version 1.26.1 appears to have been built outside the normal release process. It was a wheel only, with no sdist and no agent-framework-core of the same version, and it still depends on agent-framework-core[all]==1.26.0.
  2. No python-1.26.1 tag or release exists in microsoft/agent-framework, and the main branch does not contain the malicious code.

How it was found

  1. Egress checks can look for the exfiltration URL in proxy and DNS logs. A 200 means the host's data was accepted, and a 410 or 429 suggests it was rejected.

What it reached, and the numbers

  1. The attacker's webhook.site token was on the free tier, and at most 50 requests were captured. Those requests can still contain working cloud, CI and registry credentials.
  2. Stolen managed-identity and OIDC-exchanged tokens remain valid for up to 24 hours.

What the sources say is still unknown or disputed

  1. The root cause has not been confirmed. Wiz says 1.26.1 may have been uploaded directly to PyPI.
  2. Wiz has not established whether the durabletask compromise is related to this incident.
Show every field, with its source and grade

The AI system

Developer
Microsoft
D inferred by us from the described behaviour, reason shown
What it was for
building production-grade AI agents and multi-agent workflows
C one secondary source states it

What happened

When it happened
2026-11-17
C one secondary source states it
Who caught it
an outside party
D inferred by us from the described behaviour, reason shown
Themes
supply chain compromise, credential stealer, pypi, supply chain attack, python startup hook
C one secondary source states it
Cause in detail
1.26.1 may have been built outside the project's normal release process and uploaded directly to PyPI
C one secondary source states it
Who caused it
an outside attacker
C one secondary source states it
Earlier warning signs
Earlier in 2026 another Microsoft Python package, durabletask, was compromised after its PyPI token was stolen; the sources have not linked the two incidents.
C one secondary source states it
What went wrong
security breach
D inferred by us from the described behaviour, reason shown

Impact

Severity
major
D inferred by us from the described behaviour, reason shown
Kind of harm
others' security
D inferred by us from the described behaviour, reason shown
Who was affected
Anyone who installed agent-framework 1.26.1 or 1.26.2 in the window, including CI pipelines, developer laptops and Azure VMs with a managed identity attached
C one secondary source states it
Kinds of data exposed
credentials
C one secondary source states it
Why this severity
A source states that the scope is unbounded. Any unpinned install since 20:35 UTC on November 17 resolved to a malicious version, an unbounded scope with no stated count.
D inferred by us from the described behaviour, reason shown

Context

Base count
41,000 units, weekly
D inferred by us from the described behaviour, reason shown

Notes on gaps

Initial access (how the attacker obtained publishing ability) is unknown.

LR-2026-0904 · version 3 · published 2026-11-18 after automatic checks; not yet checked field by field by a person