CYBERSECURITY · PYPI
Microsoft Agent Framework PyPI compromise: check your environment and protect secrets
Suspect agent-framework 1.26.1 or 1.26.2? Do not start Python in that environment. Follow a safer inspection, credential-rotation, and recovery order.

Malicious agent-framework versions 1.26.1 and 1.26.2 appeared on PyPI on 17 November 2026. The credential stealer ran from a .pth file when Python started—even without import agent_framework. If those versions may have reached a laptop, CI runner, or container, do not run Python there and do not begin with pip uninstall. This is a safer response order.
Short answer
Isolate the suspected environment from the network and stop related CI jobs. Inspect lockfiles, caches, and the filesystem with native PowerShell or shell commands, not Python. If you find 1.26.1, 1.26.2, agent_framework_meta.pth , or af_runtime_diag.pth, treat the environment as compromised: preserve logs, rebuild it from a clean source, revoke secrets it could access, and review outbound-connection logs.
Microsoft called 1.26.1 and 1.26.2 unauthorized in its incident notice . GitHub Advisory GHSA-764m-3ppc-5m73 rates this supply-chain compromise critical. When checked on 19 November, PyPI listed 1.26.0 as the latest available clean release. That is a timestamped fact, not a promise about future releases.
Who may actually be affected
| Situation | Response level | Why |
|---|---|---|
| A lockfile or cache contains 1.26.1 or 1.26.2 | Immediate response | A malicious release may have been installed or used in a build |
| Version unknown and dependency not pinned | Investigate | A resolver may have selected an affected version automatically |
| Pinned to 1.26.0 with a verified hash and no affected mirror access | Verify evidence | Risk is lower, but confirm the actual artifact and cache |
| Package never used and absent from lockfiles, images, and caches | Record the check | No further action may be needed if evidence is sufficient |
Do not search only for import agent_framework. According to Wiz’s technical analysis, the attackers used .pthfiles that Python processes at interpreter startup. “We never imported it” is therefore not proof of safety.
The first 30 minutes: a safer order
- Stop the suspected runner, container, or virtual environment. Do not delete it before preserving the logs and metadata you need.
- Block outbound network access for the affected environment. In production, follow your incident process so you do not destroy evidence or cause a larger outage.
- Do not run
python,python -m pip,pip, or scripts from the suspected environment.pip uninstallstarts Python too. - Inspect files with operating-system commands, then review lockfiles, package-manager caches, CI artifacts, base images, and internal mirrors.
- If there is a match, rebuild from a clean host or runner instead of repairing the environment in place.
Blocking a domain or IP does not prove that no data left. A missing record in one log also does not prove there was no compromise: review DNS, proxy, firewall, cloud audit, and CI logs within their available retention windows.
Check without starting Python
Use filesystem search and Select-Stringin PowerShell; use find , and grepon macOS/Linux. Search for exact versions 1.26.1 and a 1.26.2, the package name, and agent_framework_meta.pth , and af_runtime_diag.pth. The tool below builds commands for your operating system and environment type.
Check at least requirements*.txt, pyproject.toml, poetry.lock, uv.lock, pip/uv/Poetry caches, historical CI artifacts, Dockerfiles and image layers, the Software Bill of Materials, internal registries, and mirrors. For a container, avoid starting a shell inside the suspect image when you can inspect an exported filesystem from a clean host.
Which secrets to revoke
Rotate not “every company secret,” but every credential available to the affected process, runner, or container. That can include Azure credentials, GitHub Actions or Azure DevOps tokens, runner OIDC identity, model and API keys, cloud credentials, registry credentials, SSH keys, and session tokens.
Revoke or block first, then issue replacements. Confirm that each old credential no longer works, update dependent services, and record the owner and rotation time. Never paste secret values into a chat, the form below, or an incident document.
Local incident-response plan
Choose your operating system, environment type, known version state, and class of accessible secrets. The plan is produced in your browser; selections are not sent to the server. Analytics records only generation, copy, or download actions—not your answers and not whether you completed any step.
Your plan
Rebuild and verify the result
Create a new environment from a clean host or disposable runner. At the time of this check, Microsoft recommended rolling back to 1.26.0; pin the exact version and a verified hash instead of a broad range. Clear or quarantine caches and internal mirrors so the affected wheel cannot return to the build.
After recovery, repeat the file search, verify the lockfile and SBOM, run tests without production secrets, and only then issue new least-privilege access. Preserve a timeline: when the dependency resolved, where it was installed, which secrets were available, which logs were checked, and exactly what was revoked.
Reduce the risk next time
- pin exact versions and hashes for critical Python dependencies;
- build artifacts in an isolated environment without production secrets;
- use short-lived tokens and least privilege in CI;
- restrict runner egress and log DNS and proxy traffic;
- verify provenance, signatures, SBOMs, and new releases before automatic updates;
- maintain a credential-owner list and revocation procedure.
For the wider model, see vibe-coding and API-key security , and AI agent access map. Ask a question without secrets in the Vibe Coding Telegram community.
Sources and verification limits
Facts were checked on 19 November 2026 against Microsoft’s incident notice, GitHub Advisory, PyPI page for clean release 1.26.0 and a Wiz’s analysis. We did not inspect your systems. This plan is not proof of compromise or remediation; involve your security team or an incident-response specialist for a critical environment.
Discussion
Share a thought or ask about the article. Your nickname and comment will be public.
Sign in with email
Get a one-time code. No password needed.
The code expires in 10 minutes. Signing in does not subscribe you to the newsletter. Data use.
Or sign in with ChatGPT ↗Loading comments…