Ingenious AI

Ingenious AI · Supply-chain security · Free self-check

Check your Python env for startup files that run before your code does

On 17–18 November 2026, releases 1.26.1 and 1.26.2 of Microsoft's agent-framework package on PyPI shipped a credential stealer hidden in executable .pth startup files (agent_framework_meta.pth / af_runtime_diag.pth) — advisory GHSA-764m-3ppc-5m73. A .pth file in site-packages is processed at every Python interpreter start; a line beginning with import executes — no import of the package required. The stealer harvested environment variables and credential files and posted them out. Both releases were pulled and hosts were told to rotate everything. This page hunts the same class in your own environments.

What this does — and does not do

Does: scans .pth file contents you paste for the stealer's published tells — executable import lines, env-var harvesting (TOKEN / SECRET / KEY / AZURE / AWS / GITHUB), credential-file reads (~/.azure, .npmrc, .git-credentials), /proc/*/environ reads, and outbound posts — and gives you the exact find commands to inventory .pth files across your own venvs and site-packages.

Does not: access your filesystem, run any command, or phone home. A browser page cannot read your disk — you run the find commands, you paste the contents, the scan happens locally in this page. Nothing is sent or stored. A clean paste covers only the files you pasted.

Step 1 — Inventory the .pth files in your own environments

Run these on your own machine (read-only listing), then paste the contents of anything you do not recognize into Step 2:

python3 -c "import site; print(site.getsitepackages())"

find . -name "*.pth" -path "*site-packages*" -exec ls -la {} \; (from a project root, covers its venv)

grep -rl "^import" --include="*.pth" $(python3 -c "import site; print(' '.join(site.getsitepackages()))") — the one-liner that matters: a legitimate .pth almost always contains only paths. Any file with a line starting import executes at startup.

Step 2 — Paste .pth contents and hunt

The facts behind this check

Per GHSA-764m-3ppc-5m73: "Malicious releases of the legitimate agent-framework package (Microsoft Agent Framework). Versions 1.26.1 and 1.26.2 add a credential stealer that is not present in the last clean release, 1.26.0. Both releases were published on 2026-11-17 … and have since been removed from PyPI." Each wheel "adds an executable .pth startup hook that imports a helper module" — which is why this class is so durable: uninstalling habits, import scanners and code review of the package itself all miss it, because the payload runs before any of your code and lives in a file most developers never open. If a stealer-class .pth ran on a machine, deleting the file is not the fix: rotate every credential that machine could read — cloud keys, tokens in the environment, and the credential files listed above.

Sources

GitHub Advisory GHSA-764m-3ppc-5m73 — Malicious code in agent-framework (PyPI)

Worried about the rest of your pipeline? BreachHunter monitors exposed surfaces over time. This page is a one-off hunt for one persistence class.

← Back to Ingenious AI home