# Microsoft agent-framework (PyPI) 1.26.1 and 1.26.2 supply-chain compromise: detection pack

Pack 1.0.0, 18 Nov 2026. Store folder `microsoft-agent-framework-pypi-1.26.1-1.26.2-2026-11/`, published to hubfs
`microsoft-agent-framework-pypi-pack-v1` (the page links that hubfs folder; the store folder name stays as it is).
All times are GMT (UTC). Sources were read on 18 Nov 2026 between 08:28 and 08:50 GMT.

## At a glance

| Item | Value | Source |
| --- | --- | --- |
| Package | `agent-framework` on PyPI, the meta-package for Microsoft Agent Framework (author Microsoft) | PyPI |
| Malicious versions | **1.26.1 and 1.26.2** (each a single wheel, no sdist) | PyPI, OSV MAL-2026-20101 |
| Last clean release | **1.26.0** (12 Nov 2026), now the current release again | PyPI |
| Published | 1.26.1 on 17 Nov 2026 at 20:35:20; 1.26.2 at 21:08:39 (33 minutes apart) | PyPI, The Hacker News |
| Quarantined by PyPI | 1.26.1 at 21:06:16; 1.26.2 at 21:16:44 | PyPI |
| Suggested exposure window | 17 Nov 2026, 20:35 to roughly 21:20 (The Hacker News's suggested window, not the upload times) | The Hacker News |
| CVE | **None assigned.** Not in CISA KEV (KEV lists CVEs only) | CISA KEV 2026.11.17 |
| Advisory records | GitHub advisory GHSA-764m-3ppc-5m73 (type malware, severity critical, affected = 1.26.1 and = 1.26.2, patched versions none), also published as OSV MAL-2026-20101 | OSV |
| Microsoft advisory | **None found** (checked 18 Nov 2026, 08:30 to 08:40 GMT). Add it here if one appears | |
| Severity | **Critical by impact (our framing).** No vendor or CNA score exists; the GHSA "critical" label is a malware classification, not a CVSS score | |
| Exploited | Yes: this is live malicious code, not a vulnerability. Treat any environment that installed either version as compromised | |
| Fix | Pin `agent-framework==1.26.0` (or earlier) by hash and rebuild exposed environments from a clean source. There is no patched release to wait for | PyPI, The Hacker News |

PyPI shows on each malicious release page: "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." PyPI also shows both releases
as "Uploaded using Trusted Publishing? No" and "Uploaded via RestSharp/106.13.0.0". How the attacker got publishing
access is not known: The Hacker News says "It's unclear how the attacker managed to obtain publishing access."

## What the malicious releases do

The Hacker News: "Once either of the versions is installed, the package drops a .pth file in the site-packages root
directory, which then gets executed automatically on every interpreter start, causing the credential stealer to run
whenever Python is started in an environment, even if the package is not explicitly imported." That includes pip.

| Behaviour | Detail | Source |
| --- | --- | --- |
| Trigger, 1.26.1 | `agent_framework_meta.pth` (one `import agent_framework_meta` line) starts `agent_framework_meta/_telemetry.py` | The Hacker News (pth), OSV (module) |
| Trigger, 1.26.2 | `af_runtime_diag.pth` imports the new top-level module `af_runtime_diag.py`; `agent_framework_meta/__init__.py` is the clean 1.26.0 file, so searching only for the 1.26.1 names misses 1.26.2 | The Hacker News, OSV |
| Process | Detaches into a background process (os.fork, os.setsid), guarded by the environment marker `_AF_TEL`, and silences all errors | OSV |
| Environment variables | Names matched by substring: TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, HF_, NPM, PIP or CI_ (non-exhaustive) (1.26.2 widens the list); also the environment of other processes (`/proc/*/environ`) | OSV, The Hacker News (substring matching) |
| Files | Azure CLI (`~/.azure/*.json`), .npmrc, .netrc, .git-credentials, .docker/config.json, Hugging Face token, Azure DevOps agent `.credentials`, .env files | OSV and The Hacker News |
| Files, one source only | pip.conf and generic JSON files: named only by The Hacker News, not by OSV (attributed to The Hacker News; UNVERIFIED in the advisory records) | The Hacker News |
| Azure DevOps OIDC | With SYSTEM_ACCESSTOKEN and SYSTEM_OIDCREQUESTURI it requests a federated token for `api://AzureADTokenExchange` | The Hacker News, OSV |
| Managed identity | Tokens from IDENTITY_ENDPOINT on App Service and Functions, or the instance metadata service (IMDS, `169.254.169[.]254`) elsewhere, plus instance metadata (up to 8,000 characters kept). MSI_ENDPOINT is named only by The Hacker News | The Hacker News, OSV |
| GitHub Actions OIDC, 1.26.2 only | ACTIONS_ID_TOKEN_REQUEST_URL, ACTIONS_ID_TOKEN_REQUEST_TOKEN, ACTIONS_RUNTIME_TOKEN; adds `/home/runner` paths; file cap raised from 60 to 80 | OSV, The Hacker News |
| Exfiltration | One JSON document, zlib-compressed, Base64-encoded, sent by HTTPS POST to `hxxps://webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb` (same URL in both releases) | The Hacker News, OSV |

## Indicators (all from the sources named; none invented)

| Indicator | Type | Release | Source |
| --- | --- | --- | --- |
| `d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110` (sha256) | wheel `agent_framework-1.26.1-py3-none-any.whl` | 1.26.1 | PyPI, OSV |
| `3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9` (sha256) | wheel `agent_framework-1.26.2-py3-none-any.whl` | 1.26.2 | PyPI, OSV |
| `agent_framework_meta.pth`, `agent_framework_meta/_telemetry.py` | payload files in site-packages | 1.26.1 | The Hacker News, OSV |
| `af_runtime_diag.pth`, `af_runtime_diag.py` | payload files in site-packages | 1.26.2 | The Hacker News, OSV |
| `webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb` | exfiltration URL (HTTPS POST) | both | The Hacker News, OSV |
| `af-runtime-diagnostics/1`, `runtime-diagnostics/1` | HTTP User-Agent | 1.26.1, 1.26.2 | OSV |
| `_AF_TEL` | environment marker set by the stealer | both | OSV |

The clean 1.26.0 wheel (sha256 `14267ec8e6929c139015f8ec918adc638a71c7656901413426bb30ab199b6d71`) contains only `agent_framework_meta/__init__.py` and its dist-info: no .pth file and no `_telemetry.py` (wheel
file list read on 18 Nov 2026 without installing or running it).

## Corrections to the original flag

1. **Times.** The flag's "roughly 20:35 to 21:20 GMT" is The Hacker News's suggested exposure window, not the upload
   times. PyPI: 1.26.1 released 20:35:20 and quarantined 21:06:16; 1.26.2 released 21:08:39 and quarantined 21:16:44.
   The checker quotes 20:35 to 21:17 GMT (PyPI); the KQL starts at 20:00 with a margin and runs to now.
2. **Status.** PyPI marks both releases "Release quarantined" (they "cannot be installed or modified until a security
   review is complete"); the release pages still list one wheel each with its sha256, and the JSON API returns 404 for
   both. Each release was a wheel only, while 1.26.0 has a wheel and an sdist.
3. **Advisory.** There is no Microsoft advisory and no CVE, but there is an advisory record: GHSA-764m-3ppc-5m73
   (OSV MAL-2026-20101), type malware, severity critical, with the two wheel sha256 values. They are now IOCs in the
   checker, KQL Q1 and the Sigma hash rule. The flag said no advisory existed.
4. **Two more payload files.** Besides the two .pth files: `agent_framework_meta/_telemetry.py` (1.26.1) and
   `af_runtime_diag.py` (1.26.2). Compiled copies in `__pycache__` suggest that Python imported them (OUR inference).
5. **One-source items.** pip.conf and generic JSON files are named only by The Hacker News, and MSI_ENDPOINT only by
   The Hacker News; they are attributed to it here. The OSV record adds `/proc/*/environ` scraping, the User-Agents,
   the `_AF_TEL` marker and the GitHub Actions variable names.
6. **Publishing.** PyPI shows both releases uploaded without Trusted Publishing, via RestSharp/106.13.0.0. This is
   recorded as a PyPI fact only; this pack draws no conclusion about the root cause, which is still unknown.

## Response

**Ecosystem advice (credited to The Hacker News, which lists these steps):** isolate affected hosts and runners; pin
the package to 1.26.0 and restore from a clean environment; check for exposure between 20:35 and roughly 21:20 on
17 Nov 2026; search proxy and DNS logs for the webhook URL; rotate exposed credentials from a clean system; audit
Azure identities and review sign-in and activity logs; audit GitHub Actions workflows that deploy to Azure. PyPI
advises "Consider using release 1.26.0 instead."

**OUR ADVICE (CybaVerse, not from Microsoft or PyPI): rotation and rebuild checklist**

1. Find exposure: run the checker on developer machines, build agents, runner images, containers and lockfiles; run
   KQL Q1 to Q5. Any hit means the host ran the stealer on every Python start after install.
2. Isolate each exposed host, runner or image. Do not run Python there again before it is rebuilt.
3. Rebuild from a clean source with `agent-framework==1.26.0` pinned by hash (`--require-hashes`, or a lockfile with
   the 1.26.0 sha256 above). Purge pip, uv and conda caches, wheel caches and any internal mirror copy of 1.26.1 or
   1.26.2. Rebuild container images rather than patching them.
4. From a clean system, rotate everything the host could read or request: Azure CLI sessions and service principal
   secrets or certificates, Azure DevOps PATs and service connections, GitHub tokens and Actions secrets, npm, PyPI,
   NuGet and Docker registry tokens, Hugging Face tokens, git credentials, cloud keys in environment variables
   (AWS and others) and every secret in .env files.
5. Managed identities and federated credentials: tokens already issued cannot be recalled by rotating stored secrets.
   Review what each managed identity and workload identity can reach, cut its role assignments to the minimum, and
   review Entra ID sign-in and Azure activity logs from 20:00 on 17 Nov 2026 (KQL Q6 to Q9).
6. Azure DevOps and GitHub: review pipeline and workflow runs that installed Python packages in the window, the
   federated credentials trusted by Entra ID applications, and any new service connections, deploy keys or secrets.
7. Block outbound `webhook[.]site` from build and production networks, and add a cooldown or an internal mirror so new
   PyPI releases are not installed within hours of publication.

## Hunts (all OUR PATTERN)

KQL file: `kql/microsoft-agent-framework-pypi-hunting.kql`. Runs in Microsoft Sentinel and Microsoft Defender advanced
hunting. Hunts start at 20:00 on 17 Nov 2026 (35 minutes before the first upload, OUR margin) and run to now.

| Query | Table | What it finds | ATT&CK |
| --- | --- | --- | --- |
| Q1 | DeviceFileEvents | Payload files written, and wheel files with the malicious sha256 or name | T1195.002 Supply Chain Compromise: Compromise Software Supply Chain; T1546.018 Event Triggered Execution: Python Startup Hooks |
| Q2 | DeviceProcessEvents | Installs pinned to 1.26.1 or 1.26.2 (hit), and unpinned installs inside the window plus margin (REVIEW) | T1195.002 Supply Chain Compromise: Compromise Software Supply Chain |
| Q3 | DeviceNetworkEvents | Connections to webhook[.]site, flagged when a Python process made them | T1567.004 Exfiltration Over Web Service: Exfiltration Over Webhook |
| Q4 | DnsEvents | Lookups of webhook[.]site | T1567.004 Exfiltration Over Web Service: Exfiltration Over Webhook |
| Q5 | CommonSecurityLog | Proxy or firewall records with the webhook URL token, the host or the payload User-Agents | T1567.004 Exfiltration Over Web Service: Exfiltration Over Webhook |
| Q6 | DeviceNetworkEvents | Python processes calling IMDS on devices that did not do so in the 30-day baseline | T1552.005 Unsecured Credentials: Cloud Instance Metadata API; T1528 Steal Application Access Token |
| Q7 | AADManagedIdentitySignInLogs | Managed-identity sign-ins with a new IP or resource after HuntStart | T1078.004 Valid Accounts: Cloud Accounts |
| Q8 | AADServicePrincipalSignInLogs | Service-principal sign-ins from IPs not in the baseline | T1078.004 Valid Accounts: Cloud Accounts |
| Q9 | AADServicePrincipalSignInLogs | Federated credential (federatedIdentityCredential) sign-ins with a new IP or credential, counted inside the window | T1528 Steal Application Access Token; T1078.004 Valid Accounts: Cloud Accounts |

Also mapped: T1552.001 Unsecured Credentials: Credentials In Files (the file theft). The App Service and Functions
identity endpoint is a local address set per app, so endpoint telemetry for it is UNVERIFIED and not hunted.
Managed-identity sign-in logs may not show token use from stolen tokens (UNVERIFIED for this case), so Q7 is a lead,
not proof.

Sigma rules in `sigma/` (all OUR PATTERN; Kusto conversions for five pipelines in `sigma/converted/`):

| Rule | Logsource | KQL |
| --- | --- | --- |
| file_event_win_agent_framework_payload_files, file_event_lnx_agent_framework_payload_files | file_event (Windows, Linux) | Q1 |
| file_event_win_agent_framework_malicious_wheel_hash | file_event (Windows, Hashes field) | Q1 |
| proc_creation_win_agent_framework_malicious_pin, proc_creation_lnx_agent_framework_malicious_pin | process_creation (Windows, Linux) | Q2 |
| dns_query_win_webhook_site_lookup | dns_query (Windows) | Q3, Q4 |
| proxy_agent_framework_exfil_webhook | proxy | Q5 |
| net_connection_win_python_imds, net_connection_lnx_python_imds | network_connection (Windows, Linux) | Q6 |

Q7 to Q9 need baselines and joins that Sigma cannot express, so they are KQL only. Expected conversion failures (7):
dns_query_win_webhook_site_lookup in microsoft_xdr, microsoft_365_defender, sentinel_asim and azure_monitor (no DNS
table mapping), and proxy_agent_framework_exfil_webhook in microsoft_xdr, microsoft_365_defender and azure_monitor.

## Checker (read only)

`scripts/check-agent-framework.sh` (bash) and `scripts/Check-AgentFramework.ps1` (PowerShell 7) give identical output
and exit codes. They never import or run Python or the package, open no sockets, write nothing and print only paths,
line numbers and version numbers, never file content (so secrets in lockfiles, index URLs or .pth files are not shown).

```
bash scripts/check-agent-framework.sh --path ~/.local --path ~/project --file saved-pip-freeze.txt
pwsh -File scripts/Check-AgentFramework.ps1 -Path $env:LOCALAPPDATA\Programs\Python -Path C:\src\app
```

- `--path DIR` walks a folder (default depth 16, `--max-depth 1` to 64): site-packages, venvs, pipx, conda and uv
  trees, wheel caches, projects, home folders or a mounted container image. Symlinked folders are not followed and
  `.git` folders are skipped. It finds dist-info folders and wheel files for 1.26.1 and 1.26.2, the four payload files
  and their compiled copies, any `.pth` file that imports `agent_framework_meta` or `af_runtime_diag`, and it reads
  requirements*.txt, requirements*.in, constraints*.txt, poetry.lock, uv.lock, Pipfile, Pipfile.lock, pdm.lock,
  pyproject.toml, pylock*.toml and environment.yml for pins, lock entries and the two wheel sha256 values.
- `--file FILE` scans one saved file: a lockfile, or a saved `pip freeze`, `pip list`, `pip show`, `conda list` or
  file search output.
- An exact clean version (for example 1.26.0) is reported as CLEAN. A reference without an exact version (`>=`, `~=`,
  `*`, `^`, a wildcard or a name only) is REVIEW: check what it resolved to on 17 Nov 2026 between 20:35 and 21:17 GMT.
- Limits: files over 8388608 bytes and lines over 8192 bytes are not scanned (REVIEW); at most 200 results are shown
  (all are counted); unreadable folders or files make the result REVIEW.
- It does not read environment variables, process lists, pip's HTTP cache blobs or unmounted container images.

| Exit | Meaning |
| --- | --- |
| 0 | NOT FOUND: nothing malicious found, and every agent-framework reference has an exact clean version |
| 1 | not used (reserved for unexpected runtime errors) |
| 2 | COMPROMISED: a malicious version, payload file, payload import or malicious wheel hash was found |
| 3 | REVIEW: an unpinned reference, a file too large or with lines too long to scan, or an unreadable folder or file, and nothing malicious found |
| 5 | USAGE OR READ ERROR |

## Caveats

- The KQL in this pack has NOT been run against a live tenant. It is parsed with Kusto.Language against the Microsoft
  Learn table schemas only; tune it on your own data.
- Not in CISA KEV: there is no CVE, and KEV lists CVEs. KEV due dates (BOD 26-04) apply to US federal agencies only.
  Pin and rebuild now regardless of KEV status.
- No CVE has been assigned. Severity here is Critical by impact (our framing); no vendor or CNA score exists.
- No Microsoft advisory was found when this pack was built.
- Indicators come only from PyPI, The Hacker News and the OSV record; this pack invents none. pip.conf, generic JSON
  files and MSI_ENDPOINT rest on The Hacker News alone.
- webhook[.]site is a public service: a lookup or connection on its own is a lead, not proof. The URL token is proof.
- Python calling IMDS is normal for Azure SDK code; Q6 and the IMDS Sigma rules need a baseline.

## Credits

Research is credited to security researchers only. The Hacker News and PyPI are cited as sources.

## Sources

- PyPI project page: https://pypi.org/project/agent-framework/
- PyPI release pages: https://pypi.org/project/agent-framework/1.26.1/ and https://pypi.org/project/agent-framework/1.26.2/ and https://pypi.org/project/agent-framework/1.26.0/
- PyPI JSON API: https://pypi.org/pypi/agent-framework/json
- The Hacker News, 18 Nov 2026: https://thehackernews.com/2026/11/attackers-compromise-microsofts-agent.html
- OSV record MAL-2026-20101 (also GitHub advisory GHSA-764m-3ppc-5m73, cited by ID only): https://osv.dev/vulnerability/MAL-2026-20101
- CISA KEV catalogue 2026.11.17: https://www.cisa.gov/known-exploited-vulnerabilities-catalog
- Microsoft Learn table reference (columns used by the KQL): https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/aadserviceprincipalsigninlogs and the matching pages for the other six tables
- Microsoft Graph signIn resource (clientCredentialType values): https://learn.microsoft.com/en-us/graph/api/resources/signin
- MITRE ATT&CK: https://attack.mitre.org/techniques/T1195/002/ https://attack.mitre.org/techniques/T1546/018/ https://attack.mitre.org/techniques/T1552/001/ https://attack.mitre.org/techniques/T1552/005/ https://attack.mitre.org/techniques/T1528/ https://attack.mitre.org/techniques/T1567/004/ https://attack.mitre.org/techniques/T1078/004/

## Files

- `README.md` this file
- `scripts/check-agent-framework.sh`, `scripts/Check-AgentFramework.ps1` the read-only checkers
- `kql/microsoft-agent-framework-pypi-hunting.kql` nine hunts
- `sigma/*.yml` nine Sigma rules; `sigma/converted/` their Kusto conversions
- `tests/` shared cases, fixtures (all marked FIXTURE_ONLY), bash and Pester tests, the KQL parse check, the Sigma
  conversion script, static gates, negative gates and `run_all.sh`
