Microsoft agent-framework PyPI package compromised with credential stealer

CriticalCompromisePyPI

On 17 November 2026, two malicious releases of Microsoft's agent-framework PyPI package (1.26.1 and 1.26.2) were published 33 minutes apart, each containing a credential stealer that runs on every Python interpreter start via a .pth file. Both versions have been quarantined on PyPI.

Published 17 Nov 2026 · Updated 19 Nov 2026

At a glancepypi-2026-11-17-agent-framework-compromise
1
Package tracked2 malicious versions

Every version named by the advisory is in the scanner, so a lockfile check finds it directly.

Severity
Critical
Type
Compromise
Published
17 Nov 2026
Last updated
19 Nov 2026
Ecosystems
PyPI
Detected by
StepSecurity, Socket, JFrog, Aikido, Wiz, Orca, OX Security, Endor Labs
Also known as
PYSEC-2026-607

Compromise. A legitimate, already-used package, maintainer account, CI pipeline, or release tag was hijacked and a malicious version was published under a name people already depend on.

What happened

The full picture

On 17 November 2026, an attacker published two malicious releases of Microsoft's official agent-framework package on PyPI. Version 1.26.1 appeared first, followed by 1.26.2 roughly 33 minutes later. The package receives approximately 190,000 monthly downloads and is part of Microsoft's AI agent tooling ecosystem.

Both releases include a .pth startup hook that fires on every Python interpreter launch without any import. The payload forks into a background process and harvests credentials. Version 1.26.1 targets environment variables, credential files, and Azure tokens; 1.26.2 expands coverage to GitHub Actions OIDC tokens. Collected data is compressed and exfiltrated to a webhook.site endpoint.

JFrog's analysis indicates the attacker repacked the legitimate wheel locally rather than compromising Microsoft's build pipeline. The 22 sibling agent-framework-* packages (including agent-framework-core) were not affected. PyPI quarantined both releases, though 1.26.2 was published after 1.26.1 had already been flagged, suggesting the attacker retained publishing credentials across the first takedown.

Version 1.26.0 remains the last known clean release. A Microsoft Agent Framework maintainer confirmed the incident on GitHub and stated an investigation was underway.

credential-theftci-cd-compromiseinfostealer
Affected packages

1 package 2 versions

These are usually pulled in as transitive dependencies rather than installed directly. Check your whole tree at once. It runs in your browser and nothing is uploaded.

Impact

What it does if you installed it

  • Credential theft: harvests environment variables, .npmrc, .netrc, .git-credentials, and /proc/*/environ from other processes
  • Cloud token theft: mints and exfiltrates Azure managed-identity tokens and Azure DevOps OIDC tokens
  • CI/CD token theft: version 1.26.2 also targets GitHub Actions OIDC tokens
  • Persistence: .pth file executes on every Python start without any import, even if the package is never used
  • Stealth: both malicious versions retain a genuine agent-framework-core 1.26.0 dependency so the framework continues to function
What to do

Clean-up steps

  1. Pin agent-framework to 1.26.0 with hash verification; remove 1.26.1 and 1.26.2 immediately
  2. Rotate all environment variables containing TOKEN, SECRET, or PASSWORD from a clean machine
  3. Rotate Azure managed-identity and Azure DevOps OIDC credentials
  4. Rotate GitHub Actions OIDC tokens if version 1.26.2 was installed
  5. Revoke and regenerate .npmrc, .netrc, and .git-credentials
  6. Check site-packages for agent_framework_meta.pth or af_runtime_diag.pth and remove them
  7. Rebuild CI container images and caches that installed agent-framework after November 17
References

Sources

pypi-2026-11-17-agent-framework-compromiseBack to incidentsSubmit a correction
Am I affected?

Check your lockfile against this and every other incident.

Paste a lockfile and it is matched on your own device against every compromised version we track. Nothing is uploaded and there is no account.